For example if I write something like this:
char choice;
while(choice != ' ')
{
printf("Insert a char (space to finish):");
scanf("%c",&choice);
...
}
The sentence in printf() is printed in output twice.It only happens with %c and not with %d inside loops(both while and for).
Why?
Thanks in advance.
Edited by WingedPanther, 01 January 2009 - 06:19 AM.
add code tags (the # button)


Sign In
Create Account

Back to top









