Questions: Compiler Phases and Organization

3 questions to test your understanding

Score: 0 / 3
Question 1 Multiple Choice

A compiler reports 'variable x used before declaration.' Which phase produces this error?

ALexical analysis
BSyntax analysis (parsing)
CSemantic analysis
DCode generation
Question 2 True / False

A one-pass compiler that processes source code from top to bottom exactly once is architecturally impractical for modern programming languages.

TTrue
FFalse
Question 3 Short Answer

Why is an intermediate representation (IR) phase valuable even when a compiler targets only a single machine architecture?

Think about your answer, then reveal below.