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.

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

Riya said:   1 decade ago
What is flush?

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)

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

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

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

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

fflush (stdin) it clears the input buffer.

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

Sri said:   8 years ago
Explain about flush.

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

Post your comments here:

Your comments will be displayed after verification.