Difficulty: Easy
Correct Answer: Interpreter generates an object program from the source program
Explanation:
Introduction / Context:
Programming language implementation involves compilers and interpreters. While both are translators at some level, they differ in when and how they produce executable artifacts. Recognizing these differences helps developers understand performance, deployment, and tooling choices.
Given Data / Assumptions:
Concept / Approach:
The key discriminator: compilers emit object code; interpreters typically do not generate a permanent object module. Instead, interpreters repeatedly parse or execute intermediate forms for each run, often line by line or statement by statement, possibly with caching.
Step-by-Step Solution:
1) Identify what is being asked: pick the statement that is NOT true of interpreters.2) Option a claims interpreters generate object programs—this describes compilers, not interpreters.3) Option b is correct: an interpreter is a translator (source → actions/bytecode execution).4) Option c is correct in spirit: interpreters analyze statements at execution time.5) Option e is also correct: interpreters execute without standalone binaries.
Verification / Alternative check:
Common interpreted environments (Python, Ruby, many shells) execute code directly or via bytecode VMs, without producing separate object files for the user.
Why Other Options Are Wrong:
Options b, c, and e accurately capture interpreter behavior. Option d (“All of the above”) is incorrect because option a is false.
Common Pitfalls:
Overgeneralizing JIT compilers as interpreters or vice versa; hybrids still retain the fundamental idea that classic interpreters do not emit object modules like compilers.
Final Answer:
Interpreter generates an object program from the source program
Discussion & Comments