Difficulty: Easy
Correct Answer: Compiler
Explanation:
Introduction / Context:Software development involves editing code, compiling it, linking, and testing. Distinguishing the roles of a compiler, debugger, and editor is essential for understanding the toolchain and diagnosing build problems.
Given Data / Assumptions:
Concept / Approach:A compiler translates high-level language into machine code or an intermediate representation, possibly producing object files for later linking. A debugger inspects and controls program execution to find defects. An editor enables creation and modification of text source files but does not translate them.
Step-by-Step Solution:
Identify the translation task: high-level → machine instructions.Map to the tool named “compiler.”Eliminate debugger and editor, which perform different roles.Reject “All of the above.”Verification / Alternative check:Build systems call compilers (and assemblers/linkers) to produce executables; debuggers attach after the program is built.
Why Other Options Are Wrong:Debugger inspects runtime behavior; editor edits text; “all” is incorrect because only the compiler does translation.
Common Pitfalls:Confusing integrated IDE actions with individual tool responsibilities.
Final Answer:Compiler
Discussion & Comments