i have an issue with two pieces of code which are nearly the same, but i don't know why they don't behave the same.
Here is the first one :
printf("Type something : );
scanf("%d", &nb);
scanf("%c", &c);
Here is the second one :
printf("Type something : );
scanf("%d", &nb);
scanf("%c", &c);
fgetc(stdin);
In the first case, the program still waits for an output at the end.
In the second one, the program skips the second scanf instruction.
It seems quite unclear to me. Can you help me please ?
Thanks in advance.