Re: Process return 0 / Process exited with return value 0

Posted 05 December 2012 - 07:44 AM

Using scanf() to extract a character string is almost as bad as using gets(), unless you provide this function with the optional size specifier. Also remember that scanf() will not accept any spaces in your string.

Never, never extract strings without using some method to limit the number of characters you will accept, so you avoid the possibilities of array buffer overrun errors.