0478.1.0.17 — Open, close and use a file for reading and • Including:: past paper questions
Real questions on 0478.1.0.17 — open, close and use a file for reading and • including:
The newest 10 of 10 written questions. Open one to see it on the real paper.
- 0478/21 · May/June 2026 · Q5c[3]
The new username is stored in the variable NewUsername Write the pseudocode to store NewUsername to the file Username.txt
See it on the paper → - 0478/22 · May/June 2026 · Q7a[1]
State one reason to store data in a file.
See it on the paper → - 0478/22 · May/June 2026 · Q7b[4]
A list of names of the members of a club are stored in a file called Names.txt Write the pseudocode statements to load a line of text from Names.txt and assign the line of text to an appropriately named variable.
See it on the paper → - 0478/21 · October/November 2025 · Q9[4]
A school stores all the students’ attendance data in a file called Attendance.txt Write an algorithm in pseudocode to read a line of text from the file and store this line in the variable StudentAttendance
See it on the paper → - 0478/22 · February/March 2025 · Q2[1]
Tick (✓) one box to complete this sentence. The pseudocode to store a hotel name held in the variable Name to a text file is A READFILE Hotels.txt, Name B WRITEFILE Hotels.txt, Name C WRITEFILE Name, Hotels.txt D STOREFILE Hotels.txt, Name
See it on the paper → - 0478/22 · October/November 2024 · Q10[6]
The function LENGTH(X) calculates the length of a string X. Write the pseudocode statements to: allow a line of text to be input to an appropriate variable; store this line of text in a text file called Main.txt; calculate the length of the line of text and output the text in lower case along with its length; store the...
See it on the paper → - 0478/21 · May/June 2024 · Q7a[2]
Outline why it is useful to store data in a file.
See it on the paper → - 0478/21 · May/June 2024 · Q7b[4]
The function LENGTH(X) calculates the length of a string X Write the pseudocode statements to: read the contents of the text file Quotation.txt into an appropriate string variable that has been declared output the string in upper case and the length of the string.
See it on the paper → - 0478/23 · May/June 2024 · Q7b[3]
Write the pseudocode statements to: • • store the content of the variable you created in part (a) to a text file named "Subjects.txt" close the text file at the end of the algorithm.
See it on the paper → - 0478/23 · October/November 2023 · Q3b[2]
Give two reasons for storing data in a file.
See it on the paper →
What examiners said
Most candidates were aware of the correct pseudocode statement used to store a piece of data held in a variable to a text file.
— Examiner report, February/March 2025, 0478/22 Q2 (Cambridge)
Most candidates stated one reason as to permanently store data, but most did not give a second reason.
— Examiner report, October/November 2023, 0478/23 Q3(b) (Cambridge)
Past papers, syllabus and examiner reports © UCLES (Cambridge University Press & Assessment). Questions are matched to topics from the official syllabus. AssessPro is independent and not endorsed by Cambridge.