File Handling - Introduction
Completion requirements
- file pointer
- fopen, fclose, fgetc
- file open modes:
- r - open (an existing) file to read.
- w - open (an existing) file to write. If the file does not exist, a new file is created. Starts writing from the beginning of the file.
- a - open (an existing) file to append. If the file does not exist, a new file is created. Starts writing from where the text ends.
- r+ - open (an existing) file to read & write. If the file does not exist, a new file is created.
- a+ - open (an existing) file to read & append. If the file does not exist, a new file is created.
Last modified: Monday, 6 July 2026, 4:29 PM