C Programming/C Reference/stdio.h/rewind

< C Programming < C Reference < stdio.h

rewind is a function in the C programming language that is specified in the stdio.h library header file. The function moves the file position indicator to the beginning of the specified stream, while also clearing the error and EOF flags associated with that stream.[1]

rewind acts as if fseek(stream, 0L, SEEK_SET) was called for the stream passed, except that rewind causes the error indicator to also be cleared.

Syntax

#include <stdio.h>
void rewind( FILE *stream );

References

  1. , The Open Group Base Specifications Issue 7, IEEE Std 1003.1-2008.
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.