File Handling

Computer ScienceOCRGCSEUnit: 3.2 Programming
Free taster
5 of 6 sections open
The basics

Permanent Storage

Permanent Storage

Variables are temporary - turn off the computer and they're gone! Files provide permanent storage. Think of files like notebooks - you can write in them, read from them, and they're still there tomorrow. Games save your progress to files. Apps store your settings. Databases are just organised files. Without file handling, every program would start fresh every time!

Now try it yourself

Quiz · Question 1 of 15

Which OCR pseudocode command is used to open a file called 'scores.txt' for reading?

Tap an answer to check it

Revise every Computer Science topic, free during alpha

File Handling is one of 60 topics on PrepWise — all aligned to your exam board.

Start revising free →