GATE CS 2024 Set 2 | Question 21
Compiler Design › Basics & Lexical · MCQ · 1 mark · Answer: B
- Question 21Compiler Designmcq1 markMatch Set X to Set Y: P. Lexical Analyzer, Q. Syntax Analyzer, R. Intermediate Code Generator, S. Code Optimizer <-> 1. Abstract Syntax Tree, 2. Token, 3. Parse Tree, 4. Constant Folding.
- A.P-4; Q-1; R-3; S-2
- B.P-2; Q-3; R-1; S-4✓
- C.P-2; Q-1; R-3; S-4
- D.P-4; Q-3; R-2; S-1
Answer: B
Solution
Answer: (B) P-2; Q-3; R-1; S-4 Lexical analyzer produces Tokens (2); syntax analyzer produces the Parse Tree (3); intermediate code generation works from the Abstract Syntax Tree (1); code optimization includes Constant Folding (4). - A.
More GATE PYQ on Basics & Lexical
All GATE CS Compiler Design PYQ →Attempt GATE CS 2024 Set 2 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →