fseek() function: Random Access input/output (I/O) file function in C

fseek() function: fseek() function is used for random access read and write operations.


int fseek(FILE *p, long num_bytes, int origin);

where, pi is file pointer.

num_bytes is number of bytes from origin,

origin is a macro.

SEEK_CUR : To seek current position

SEEK_SET : To seek start of file

SEEK_END : To seek end of file

Leave a Reply