scanf() function doesnt work program in c [GNU/LINUX] [duplicate]

You should use a scanf format string " %c" to skip any pending whitespace characters, including the newline the user typed after the first letter. As posted, the second scanf() reads the \n that is pending in the input stream, so it does not wait for user input.

Leave a Comment