Skip to content

Course home

Sign up

Programming languages

EasyMediumHard
12345678910111213141516171819202122232425
Question 21

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?

A

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.

B

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.

C

An interpreter will execute the loop much faster than a compiler because it avoids the overhead of a full translation process before execution.

D

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.

Markscheme

Programming languages Questions

  1. GCSE
  2. /Computer Science
  3. /Programming languages

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.

Question bank