A developer is writing a high-performance simulation program that contains a deeply nested loop executed millions of times.
Which of the following statements correctly describes how a compiler and an interpreter differ in handling this program?
The compiled program requires the compiler to be installed on the user's machine to run, whereas the interpreted version can run as a standalone machine code executable.
A compiler translates the loop statements once into machine code, whereas an interpreter must parse and translate the statements inside the loop every time they are executed.
An interpreter will execute the loop much faster than a compiler because it avoids the overhead of a full translation process before execution.
If a syntax error exists on a line inside the loop that only executes under rare conditions, a compiler will run the program until that line is reached, whereas an interpreter will prevent the program from running at all.
41 exam-style questions on Edexcel GCSE Computer Science Programming languages, covering Low-level and high-level languages and Interpreters versus compilers. Each one has a worked solution and a mark scheme showing where the marks go.