Multiple choice

The synthesis phases are: 1._________________, and 2. code generation.

  1. storage allocation

  2. lexical analysis

  3. semantic analysis

  4. none of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A compiler is divided into analysis and synthesis phases. The synthesis phase is responsible for taking the analyzed source code and producing the target machine code, which involves storage allocation for variables and the actual generation of instructions. Lexical and semantic analysis are part of the analysis phase, which occurs before synthesis.