[Solved] Creating an infinite loop with an exception on C [closed]


int val;

while (1) {

    printf("Enter the number to be reversed");
    scanf("%d", val);

    if (val == 0) {
        printf("exiting program...!!");
        exit(0);
    }

    // your code for reversing

}

4

solved Creating an infinite loop with an exception on C [closed]