how "%c" specification works with scanf()? -
i have following code
char c; scanf("%c",&c);
now have read "%c" consume whitespaces including enter
.but why when press enter
(before pressing character) %c
not accepting it?
so why accept enter
key present in buffer due previous calls , not accept enter
key before pressing character?
i assume question why inputs, including enter
, not passed scanf(). not %c or %d or other type. see, special characters esc
not passet io functions. recognized by, instance, console opens when executing code.
Comments
Post a Comment