Interviewer And Interviewee Guide

C Functions Interview Question:

Tell us the use of fflush() function in C Language?

Submitted by: Administrator
In ANSI, fflush() [returns 0 if buffer successfully deleted / returns EOF on an error] causes the system to empty the buffer associated with the specified output stream.
It undoes the effect of any ungetc() function if the stream is open for input. The stream remains open after the call.
If stream is NULL, the system flushes all open streams.

However, the system automatically deletes buffers when the stream is closed or even when a program ends normally without closing the stream.
Submitted by: Administrator

Read Online C Functions Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.