#include
int main()
{
char C, B;
int x;
printf(\"What comes after G\\n\");
scanf(\"%c\", &C);
printf(\"What comes after
The problem is you are using scanf to get the character ..and a new line will be added at the end of each input from user . So the second time only the new line will be stored in the 'B' Because of the first input given by you ..
Instead of scanf , change it to getchar - your problem should get solved