Tip Bank

DevX - Software Development Resource

Repositioning a File Pointer

The fseek() function provides random file access. It’s declared in as follows: int fseek(FILE *fstream, int offset, int whence); The function sets the file pointer associated with fstream to a

DevX - Software Development Resource

Getting the Current File Position

The standard function ftell() reports the current file pointer position. The file pointer is a numeric value that represents the current position in the file in the form of offset