C Random Access Files - ftell, rewind, fseek

Опубликовано: 05 Февраль 2025
на канале: Painless Programming
4,479
83

C Random Access Files - ftell, rewind, fseek
You can move to a location in a file with fseek .
fseek lets you move to an offset from SEEK_SET (beginning of file)
SEEK_CUR (current position in file) or
SEEK_END(from end of file). You can move to a negative offset if you are seeking relative to the end of the file.

rewind will move back to the beginning of a file.

ftell returns a long int, the current position in the file.