0
Why op skip after i enter first num.
int num[100],rt; char op; printf("Enter number:\n"); scanf("%d",&num[0]); printf("Enter operator:\n"); scanf("%c",&op); printf("Enter number:\n"); scanf("%d",&num[1]);
3 Respuestas
+ 1
here in the example the first no is int that is of 2 bite and second input is of 1 byte. thats why compiler dosent take it as input . so solution to this is use
fflush (stdin );after scanf function.
0
can you explain function of fflush(stdin);
0
it simply clears the input buffer,its like clrscr () but it works for input values but not a single value is manipulated.