Hello to all. I have some particular questions about scanf and how its works.
Assuming that we have the code :
Assuming that we have the INPUT :
printf(" Give a character : ");
scanf("%c" , &mychar);
printf(" Your char is : %c" , mychar);
Well , ENTER character have been stored into mychar variable?
Give a character: <- I pushed ENTER
Character is: <- What is here?
On the other hand if I have
If I give ENTER ( '\n') + A (character) scanf will match ENTER with space ordinary into format string of scanf and then will match A with mychar variable (due to %c conversion specification ??)
scanf(" %c" , &mychar);
Thank you in Advance