ProgrammingMedium Exam FrequencyOCR

File Handling

Revise File Handling in Programming for GCSE Computer Science with 15 exam-style questions and 10 flashcards. This topic appears regularly enough that it should be part of a solid GCSE revision cycle.

Sample Flashcards

How do you read a line?
line = myFile.readLine()
Why must you close files?
To save data and prevent corruption

Sample Questions

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

  • A. read("scores.txt")
  • B. myFile = open("scores.txt")
  • C. file.open("scores.txt", "r")
  • D. load("scores.txt")
1 markfoundation

Describe how OCR pseudocode reads all lines from a text file, using a WHILE loop. Include the role of endOfFile() in your answer.

3 marksstandard

15

exam-style questions

10

revision flashcards

Ready to revise File Handling?

Get personalised daily study plans, adaptive quizzes, and spaced repetition flashcards.

Join Alpha