Programming languages

EasyMediumHard
123456
Question 5
Medium

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 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.

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

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.

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.

Programming languages Questions

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