Home / C Programming / Library Functions :: Discussion

Discussion :: Library Functions

  1. What is the purpose of fflush() function.

  2. A.
    flushes all streams and specified streams.
    B.
    flushes only specified stream.
    C.
    flushes input/output buffer.
    D.
    flushes file buffer.

    View Answer

    Workspace

    Answer : Option A

    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.


Be The First To Comment