Skip to content

Text files: write then read

Handout

Files keep data after the program ends

  • A file stores data on disk, so it is still there after your program stops.
  • You work with a file through a FILE * — a pointer you get from fopen.
  • In these tasks you write a file, then read it back in the same program, so everything is self-contained.

Handout

Log in or create account

IGCSE & A-Level