Intermediate
Compilers & Programming Language Theory
Q67 / 100
What is the main idea behind a two-pass assembler or compiler design?
Correct! Well done.
Incorrect.
The correct answer is C) Separating the work into a first pass that gathers information such as label/symbol definitions and a second pass that uses that information to resolve forward references and emit final code
C
Correct Answer
Separating the work into a first pass that gathers information such as label/symbol definitions and a second pass that uses that information to resolve forward references and emit final code
Explanation
A one-pass design struggles with forward references (using a label or symbol before its definition appears). A first pass builds a complete symbol table; the second pass then resolves all references and generates correct code or addresses.
Progress
67/100