A compiler translates programs written in a high-level language.
State how much of a program a compiler translates before the program is run.
Mark scheme
Award one mark for:
- The whole program (before it is run) (1)
Allow all of the code/the entire program/the whole program in one go
Do not accept one line/statement at a time or each line as it is executed
Do not accept translating only the lines that contain errors
Example answers and how they were marked
The whole program, before it is run.
Why: Whole program translated before it is run (1).
It translates the program one line at a time.
Why: Describes an interpreter; the scheme does not accept line-by-line translation.
It translates only the lines that contain errors.
Why: Not a compiler behaviour; the scheme does not accept translating only error lines.