It is used to set the file-position indicator for the stream pointed to by the stream. The new position is measured in bytes from the begning of the file and obtained by adding offset to the position specified by whence, whose values are defined in <stdio.h>. fseek() function is used to randomly access a file. For example: int fseek(FILE *stream, long offset, int whence);