"scanf" has a "read, but don't do anything with it" option. Providing that the user does not enter a space before hitting enter, this will work -


scanf("%c%*c", &ch);

I think it's important...