int main() { int r, c; r = getchar(); c = getchar(); putchar(r); putchar(c); printf(\"\\n\"); return(0); }
After it reads i
You're probably typing X + Enter. The first getchar() reads the character X, and the second getchar() reads a newline generated when you press Enter. Type both your characters without pressing Enter.
getchar()
X