What is the use of a flushall functional group in C?

The flushall() function clears all buffers associated with input streams, and writes any buffers associated with output streams. A subsequent read operation on an input file causes new data to be read from the associated file or device.

Calling the flushall() function is equivalent to calling the fflush() for all open stream files.

the problem occur in input of value when we place multiple scanf() consecutively so we put fflush() in between them.