Working with file I/O

All input and output (I/O) operations use the current file offset information stored in the system file structure.

The current I/O offset designates a byte offset that is constantly tracked for every open file. The current I/O offset signals a read or write process where to begin operations in the file. The open subroutine resets it to 0. The pointer can be set or changed using the lseek subroutine.