Worked solution from the Software Paper 1 Computer Systems booklet, Part 2 of 2.
Write one thing both do, for example:
Both translate high-level language into machine code (low-level language) [1]
Also accepted: both check for errors, or both report errors.
Give two differences. Say what the interpreter does, then what the compiler does.
Difference 1: an interpreter translates and runs the code line by line [1]
... whereas a compiler translates the whole program in one go [1]
Difference 2: an interpreter stops and reports an error as soon as it finds one [1]
... whereas a compiler gives an error report at the end of translation (and will not run any code if there are errors) [1]
Other accepted differences: a compiler produces an executable file but an interpreter does not; an interpreter lets you correct errors straight away, but a compiler must translate again after each correction.
Another type of translator is an assembler [1]
▶ Whole paper
Video solution of the whole paper · by Level Up with Aqeel Ahmed: CS Edition. 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.