Cambridge A2 Level Computer Science 9618 · 20.2 File Processing and Exception Handling

Q34 · 9618/33/O/N/25 Q12

Worked solution from the Further Programming Paper 3 Advanced Theory booklet, Part 2 of 2.

Q349618/33/O/N/25original Q12Structured · 5 marks
Question 12 from 9618/33/O/N/25

Worked solution

(a)

Write that an exception is an unplanned or unexpected event that happens while a program is running [1]

... caused by an error in the programming or logic that was not found when the program was built [1]

The effect can be that the program halts unexpectedly [1]

(b)

Example: division by zero [1]

Reason: the processor cannot work out the answer, so the program crashes [1]

Other correct examples and reasons also score.

KEY IDEAAn exception is an unexpected runtime event that can stop the program.
TOTAL 5 marks

Official mark scheme

Mark scheme for 9618/33/O/N/25 question 12
VIDEO
▶ Topic lesson

A lesson on this topic · by James Gan. 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.