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');
can anyone explain ?