Fflush() argument in ANSI C

Identify the correct argument for the function call fflush() in ANSI C:
A)stdout
B)stdin
C)stderr
D)All the above

Questions by prashanthi k

Showing Answers 1 - 15 of 15 Answers

divyavenki

  • May 22nd, 2008
 

fflush()'s purpose is to write any buffered output data for the specified stream.fflush is used on the standard output stream because stdout is usually buffered and the output might not be prompted immediately.

Its prototype is
int fflush(FILE *stream_pointer);

it is used clear the data in the buffer which is entered previously.
ex: if i entered name: kiran
            now i have to enter age: here i will use fflush.
           entered age :   21.
          

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions