What is the use of fflush(stdin) function in c Language? | Sololearn: Learn to code for FREE!

+2

What is the use of fflush(stdin) function in c Language?

5/23/2018 6:26:40 AM

Hemanth

1 Answer

New Answer

+13

Use of fflush(stdin) in C. fflush() is typically used for output stream only. Its purpose is to clear (or flush) the output buffer and move the buffered data to console (in case of stdout) or disk (in case of file output stream). https://www.geeksforgeeks.org/use-fflushstdin-c/