Cambridge O Level Computer Science 2210 · 8.3 File handling

Q65 · 2210/23/O/N/23 Q3

Worked solution from the Programming Paper 2 Algorithms, Programming and Logic booklet, Part 3 of 3.

Q652210/23/O/N/23original Q3Structured · 6 marks
Question 3 from 2210/23/O/N/23

Worked solution

(a)

Match by what each keyword does:

DescriptionKeyword
stores data in a fileWRITE
retrieves data from a fileREAD
displays data on a screenOUTPUT
enters data from a keyboardINPUT

stores data in a file → WRITE [1]

retrieves data from a file → READ [1]

displays data on a screen → OUTPUT [1]

enters data from a keyboard → INPUT [1]

OPEN is not used.

(b)

Write any two reasons:

The data is stored permanently (it is kept after the program ends or the power is off) [1]

The data can be moved to another computer [1]

Another copy (backup) can be made and stored or accessed elsewhere. (only two marks)

KEY IDEAINPUT and OUTPUT deal with keyboard and screen; READ and WRITE deal with files.
TOTAL 6 marks

Official mark scheme

Mark scheme for 2210/23/O/N/23 question 3
VIDEO
▶ Whole paper

Video solution of the whole paper · by O/Alevel CS by Wasiq. Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.