No, it means ignore the newline, which is a single character ('\n'). So if you typed:
mk27\n
(the newline being because of the enter key), and you capture everything up to but not including...
Type: Posts; User: MK27
No, it means ignore the newline, which is a single character ('\n'). So if you typed:
mk27\n
(the newline being because of the enter key), and you capture everything up to but not including...
Never use fflush(stdin) -- it is not defined by the C standard:
Read my previous post; the "*" flag means ignore. In the context of your scanf line, that %c will be the newline.
Yep. Now check your docs for this angle:
Or, you could just use %s, and then, as Dino is trying to say, remove the '\n' from your string if desired.