A compiler is a translating program which
2023
A compiler is a translating program which
Answer: D. More than one of the above — ConceptA compiler is a language-processor system software that converts a complete high-level-language source program into an equivalent machine-language…
- A.
Translates instruction of a high-level language into machine language
- B.
Translates entire source program into machine language program
- C.
Is not involved in program's execution
- D.
More than one of the above
- E.
None of the above
Attempted by 964 students.
Show answer & explanation
Correct answer: D
Concept
A compiler is a language-processor system software that converts a complete high-level-language source program into an equivalent machine-language program (object code) before the program is run, translating the source as a whole rather than instruction by instruction during execution. This whole-program, before-execution translation is what separates a compiler from an interpreter, which translates and executes instructions one at a time while the program runs.
Application
The statement that a compiler translates the high-level language's instructions into machine language matches the language-conversion function every compiler performs: it converts the human-readable source code into machine-executable code that a processor can run.
The statement that a compiler translates the entire source program into a machine-language program matches the whole-program scope of compilation: the compiler processes the complete source file together and produces the program's machine-language output (object code, which may still need linking before it can run), rather than translating and running instructions piecemeal.
The statement that a compiler is not involved in the program's execution matches the compiler's lifecycle: once the compiler has produced this machine-language output, its job is done, and the resulting program is run separately by the operating system and processor, after any needed linking, without the compiler taking part.
Because each of these three statements independently and accurately describes a real property of a compiler, no single one of them alone captures the compiler's full behaviour — recognising that more than one statement holds true at the same time is the correct reading of the question.
Cross-check
Checking the remaining option that claims none of the statements apply confirms it cannot hold, since at least one — in fact, all three — of the statements above is accurate. This confirms that the option acknowledging multiple true statements is the one that fits the question.