Shifts the current read/write position in a stream input/output file to the beginning of the file.
The rewind function shifts the current read/write position in the stream input/output file indicated by file pointer fp, to the beginning of the file.
The rewind function clears the end-of-file indicator and error indicator for the file.
Note that calling the rewind function cancels the effect of the ungetc function.