If I try something such as:
int anint; char achar; printf("nEnter any integer:"); scanf("%d", &anint); printf("nEnter any character:"); scanf("%c", &achar); printf("nHellon"); printf("nThe integer entered is %dn", anint); printf("nThe char entered is %cn", achar);
It allows entering an integer, then skips the second
scanf completely, this is really strange, as when I swap the two (the
char scanf first), it works fine. What on earth could be wrong?