Cambridge O Level Computer Science 2210 · 4.2 Types of programming language, translators and integrated development environments (IDEs)

Q16 · 2210/11/M/J/22 Q6

Worked solution from the Software Paper 1 Computer Systems booklet, Part 2 of 2.

Q162210/11/M/J/22original Q6Structured · 5 marks
Question 6 from 2210/11/M/J/22

Worked solution

(a)(i)

Write one other similarity:

Both check for errors (or report errors) [1]

(a)(ii)

Give two differences and explain each. Say what the interpreter does and what the compiler does.

Difference 1: an interpreter translates the code line by line and runs each line straight away [1]

... whereas a compiler translates the whole code at the same time, before it is run [1]

Difference 2: an interpreter stops and reports an error as it meets it, and runs the code up to that point [1]

... whereas a compiler makes an error report at the end and will not run the code if there is an error [1]

Other accepted differences: a compiler produces an executable file but an interpreter does not; an interpreter is needed every time the program runs, but a compiler is not.

KEY IDEACompare both translators point by point: line by line against the whole program, and errors reported at once against at the end.
TOTAL 5 marks

Official mark scheme

Mark scheme for 2210/11/M/J/22 question 6
VIDEO
▶ Starts at Q6 (8:50)

Starts at Q6 (8:50) · by Ace Academy. 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.