The rewind function is equivalent to fseek (file_ptr, 0, SEEK_ SET). You can use the rewind function with either record or stream files. A successful call to rewind clears the error indicator for the file. The ANSI C standard defines rewind as not returning a value; therefore, the function prototype for rewind is declared with a return type of void. However, since a rewind can fail, and since previous versions of the Compaq C RTL have declared rewind to return an int, the code for rewind does return 0 on success and -1 on failure. See also fseek.