Syntax of fsetpos()
int fsetpos(FILE *stream, const fpos_t *pos)
Parameters
- stream – This is the pointer to a FILE object that identifies the stream.
- position – This is the pointer to a fpos_t object containing the desired value of the position indicator.
Return Value
- If it is successful, it returns zero otherwise returns a nonzero value.
fsetpos() (Set File Position) in C
The fsetpos() function moves the file position indicator of the given file stream to the specified position. When fsetpos() is executed, the end-of-file indicator is reset. fsetpos() function is a part of <cstdio> header file in C Standard Library.