Does anyone know why this is falling through?
the second printf statement displays however, program terminates without waiting for input character from user. I've tried fflush(stdin) but with no luck
Code:#include <stdio.h>
int main()
{
char ch;
int n;
printf("user data: ");
scanf("%d",&n);
if(n==5)
{
/*obtain more data from user*/
printf("Enter more Data? ");
scanf("%c",&ch);
}
return(0);
}