OpenStudy (anonymous):

Why an input function cannot follow an output function without an intervening call to fflush, fseek, fsetpos, or rewind while using standard I/O stream?

5 years ago
OpenStudy (anonymous):

In I/O streams the input function will start processing the data provided by output function. Hence, we should flush the data out of the stream before invoking input function and thus ensure input function acts on proper data instead of some junk in the stream.

5 years ago
OpenStudy (anonymous):

Thank you for your reply! And when we work with C Program Standard I/O library,how much is the stream buffer? In the Computer.Systems:A.Programmer's.Perspective,it says that An input function cannot follow an output function without an intervening call to fflush,fseek, fsetpos,orrewind. As you say, fflush empties the buffer associated with a stream.But the three other functions just change the current file position,what is the impact of these functions do for the stream buffer.

5 years ago
Similar Questions: