I am new to Xcode development tool. To debug a problem, I have tried a very simple code:
int main()
{char N;
char M;
scanf("%c",&N);
scanf("%c",&M);
printf("%c",N);
printf("%c",M);
}
But the problem is that the compiler doesn't seem to read the second scanf. So I can enter one character in the console, and then the program stops. Amazingly, when I write the same code with "int" in place of "char", it works just fine. Does anybody have an idea what's wrong?