Warning: implode(): Invalid arguments passed in /www/wwwroot/jobquiz.info/mdiscuss.php on line 336 We should not read after a write to a file without an intervening call to fflush(), fseek() or rewind() ?->(Show Answer!)
1. We should not read after a write to a file without an intervening call to fflush(), fseek() or rewind()
Ask Your Doubts Here
Comments
By: guest on 01 Jun 2017 06.02 pm
True, we should not be able to read a file after writing in that file without calling the below functions. int fflush ( FILE * stream ); If the given stream was open for writing and the last i/o operation was an output operation, any unwritten data in the output buffer is written to the file. int fseek ( FILE * stream, long int offset, int origin ); Its purpose is to change the file position indicator for the specified stream. void rewind ( FILE * stream ); Sets the position indicator associated with stream to the beginning of the file.