Identify the type of translator that translates the whole program into machine code before it is run.
Mark scheme
- B Compiler (1)
- The only correct answer is B. The correct answer is compiler.
- A is not correct because an assembler translates assembly language code into machine code, not a high-level program
- C is not correct because an interpreter translates and executes the code line by line, without producing a complete machine code program first
- D is not correct because a linker combines object code files into a single executable, it does not translate source code
Example answers and how they were marked
B Compiler
Why: Selected the compiler, the translator that translates the whole program into machine code before it is run (1).
C Interpreter
Why: Near miss: an interpreter translates and executes the code line by line, so it does not translate the whole program into machine code before it is run.
A Assembler
Why: Confuses the translators: an assembler translates assembly language code into machine code, it does not translate a high-level program as a whole.