ISRO Computer Science (CSE) 2023 - Question 10

All ISRO Computer Science (CSE) papers | ISRO Computer Science (CSE) 2023

Topic: Compiler Design

Which sequence below best describes the order in which the phases of a compiler typically work?

  • A. Syntax analysis, lexical analysis, semantic analysis, code optimization, intermediate code generation
  • B. Lexical analysis, syntax analysis, semantic analysis, code optimization, intermediate code generation
  • C. Syntax analysis, lexical analysis, syntax analysis, semantic analysis, intermediate code generation, code optimization
  • D. Lexical analysis, syntax analysis, semantic analysis, intermediate code generation, code optimization

Answer: D. Lexical analysis, syntax analysis, semantic analysis, intermediate code generation, code optimization

Explanation: The standard phased architecture of a compiler executes in the following order: Lexical analysis -> Syntax analysis -> Semantic analysis -> Intermediate code generation -> Code optimization -> Target code generation.

| | All questions of ISRO Computer Science (CSE) 2023