GATE CS 2024, set 2 · Question 21 · Compiler Design · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

Consider the following two sets:
Which one of the following options is the CORRECT match from Set X to Set Y ?

Set XSet Y
P. Lexical Analyzer1. Abstract Syntax Tree
Q. Syntax Analyzer2. Token
R. Intermediate Code Generator3. Parse Tree
S. Code Optimizer4. Constant Folding
  1. (A) P – 4; Q – 1; R – 3; S – 2
  2. (B) P – 2; Q – 3; R – 1; S – 4
  3. (C) P – 2; Q – 1; R – 3; S – 4
  4. (D) P – 4; Q – 3; R – 2; S – 1
Answer

Answer (B)

Answer from the official GATE CS 2024 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes