there s a problem with scanf when reading a string to char array... if the length of input is greater than the allocated size of the character array..
somebody in the group posted..
fgets , sscanf and the below functions can be used instead of scanf.
junk = getchar();
} while (junk != '\n' && junk != EOF && junk != '\0');
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…