Skip to content

Course home

Sign up

Programming languages

EasyMediumHard
123456
Question 5

A software engineer is developing a real-time control system for a high-precision medical device. They are deciding whether to compile the source code directly to native machine code or to use an interpreter.

Which of the following statements correctly describes a key execution or resource difference between using a compiler and an interpreter in this scenario?

A

A compiled program requires less memory at runtime because only the compiled machine code is executed, whereas an interpreted program requires both the interpreter software and the source code (or intermediate code) to reside in memory.

B

An interpreted program runs faster during execution because translation occurs dynamically line-by-line, avoiding the initial time-consuming compilation pass.

C

A compiled program is more secure from reverse-engineering because the compiler encrypts the source code inside a virtual machine, whereas an interpreter converts the code into easily readable assembly language.

D

An interpreter is more suitable for real-time safety-critical loops because it guarantees predictable execution times by translating and executing each instruction in a fixed number of CPU clock cycles.

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