#include
int main()
{
char C, B;
int x;
printf(\"What comes after G\\n\");
scanf(\"%c\", &C);
printf(\"What comes after
The reason for this problem is newline character \n leftover by the previous scanf after pressing Enter. This \n is left for the next call of scanf.
To avoid this problem you need to place a space before %c specifier in your scanf.
scanf(" %c", &C);
...
scanf(" %c", &B);
...
scanf(" %c", &X);
A space before %c is able to eat up any number of newline characters.