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

Popular posts from this blog

php - How to serve a file for download on WordPress -

how to share virtual sharepoint server and get it in host windows and visual studio? -