C Language: fsetpos function(Set File Position)

In the C Programming Language, the fsetpos function sets the file position indicator for the stream pointed to by stream.

Syntax

The syntax for the fsetpos function in the C Language is:




int fsetpos(FILE *stream, const fpos_t *pos);



Parameters or Arguments

stream

The stream whose file position indicator is to be modified.

pos

The file position to set for stream (which was obtained by a previous call to the fgetpos function).

Returns

The fsetpos function returns zero if successful. If an error occurs, the fsetpos function will return a nonzero value and updates errno.

Required Header

In the C Language, the required header for the fsetpos function is:




#include <stdio.h>



Applies To

In the C Language, the fsetpos function can be used in the following versions:

  • ANSI/ISO 9899-1990

stdio.h Functions





Instagram