C Programming - Library Functions - Discussion

Discussion Forum : Library Functions - General Questions (Q.No. 6)
6.
What is the purpose of fflush() function.
flushes all streams and specified streams.
flushes only specified stream.
flushes input/output buffer.
flushes file buffer.
Answer: Option
Explanation:
"fflush()" flush any buffered output associated with filename, which is either a file opened for writing or a shell command for redirecting output to a pipe or coprocess.

Example:
fflush(FilePointer);
fflush(NULL); flushes all streams.

Discussion:
10 comments Page 1 of 1.

Mukthahar said:   7 years ago
The answer is C. It flushes i/o buffer.

Sri said:   8 years ago
Explain about flush.

Shraddha said:   9 years ago
As far as I know, fflush flushes the buffer.

BHASKAR said:   1 decade ago
fflush clear the given buffer.

fflush (stdin) it clears the input buffer.

Ankita said:   1 decade ago
Yaa please explain with an example.

Madhuri said:   1 decade ago
Plese explain with an example program.

Rajesh said:   1 decade ago
Thank rahul.
(1)

Rahul said:   1 decade ago
In the simple mean of flush that to remove ALL the useless thing.

We use the flush to clear the unusefull space which is use in programming.
(1)

Riya said:   1 decade ago
What is flush?

Ramesh said:   2 decades ago
Tell me the meaning of flush.

Post your comments here:

Your comments will be displayed after verification.