5
Studying strings in C I came across the following phrase: "Clearing the buffer, for example, is not always desirable, and for more professional and secure programming it is not recommended to use fflush for example."
Why use the function fflush()
to clear the buffer after a scanf()
is not recommended? What is the best way to clear the buffer to avoid problems like reading the NEW LINE character unintentionally?