Difficulty: Easy
Correct Answer: Code generation
Explanation:
Introduction / Context:Compilers pass source through multiple phases: lexical analysis, parsing, semantic analysis, optimization, and code generation. This item pinpoints the phase responsible for turning intermediate representation into target code and resolving label addresses.
Given Data / Assumptions:
Concept / Approach:
Step-by-Step Solution:
Identify tasks (emit code, resolve labels) → code generation.Eliminate parsing (syntax analysis) and purely planning steps (storage assignment).Recognize that emitting final machine code is quintessential code generation.Verification / Alternative check:
Standard compiler texts list label fix-ups and target emission under code generation and backend phases.Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
Code generation
Discussion & Comments