What is drawback of reading a multi-word string with scanf() function?
Answers
Answered by
0
"scanf() is the most useful and most commonly used function in the programming language C.
However, it has a major drawback when it comes to string input and especially when it is a multi-word string input.
Actually how scanf() function behaves is that it keeps reading the string until a whitespace is encountered or until it reaches the end of the word. Therefore, it is only capable of reading a string up to one word."
Similar questions