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

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -