Using rewind ( ) function

The rewind( ) function resets the file position indicator to the beginning of the file specified as its arguments. That is, it “rewinds” the file. Its protype is

void rewind(FILE *fp);

where fp is a valid file pointer.



In Example 1 and Example 3 the rewind () function is used after input is complete to move file position indicator at the beginning so that data can be read from the beginning.

Using feof( ) function (Prev Lesson)
(Next Lesson) Formatted Disk I/O Functions in file
Back to C-Programming

No Comments

Post a Reply

Bhim Gautam
Role : Lecturer
Read More
error: Content is protected !!