When I input a
, the output is not a
. Condition is true so why is the output not a
?. When I use getchar
instead of scanf_s
, it works fine. What's the issue?
char op;
scanf_s("%c", &op);
if ( op == 'a' )
printf("the character is a");
else
printf("not a");