An interpreter translates high-level code differently from a compiler.
Identify what an interpreter does immediately after translating a line of code.
Mark scheme
- A Executes the line (1)
- The only correct answer is A. The correct answer is that the interpreter executes the line.
- B is not correct because an interpreter does not produce object code; that is what a compiler does
- C is not correct because an interpreter does not save the translated code to a file
- D is not correct because the interpreter executes the current line before it translates the next line
Example answers and how they were marked
A Executes the line
Why: Selected the line being executed straight after translation, which is how an interpreter works (1).
D Translates the next line
Why: Near miss: the interpreter executes the translated line first and only then moves on to translate the next line, so no mark.
B Produces the object code
Why: Confuses interpretation with compilation: object code is produced by a compiler, not an interpreter, so no mark.