scanf() / Reading a string
There is only one thing I really need to say about using scanf() to read a character string:
Read this about gets() and replace with scanf("%s", ...).
scanf() and gets() have the exact same problem with memory overrun. You can easily read in more characters than your char* can hold. And of course, scanf() has The Steps, too.
The solutions are the same.
'Nuff said.
Coming next, scanf() / Reading numbers.
I'll be baaack...