GATE CS 2017, set 2 · Question 5 · Compiler Design · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer
Match the following according to input (from the left column) to the compiler phase (in the right column) that processes it:
| Input | Compiler phase |
|---|---|
| (P) Syntax tree | (i) Code generator |
| (Q) Character stream | (ii) Syntax analyzer |
| (R) Intermediate representation | (iii) Semantic analyzer |
| (S) Token stream | (iv) Lexical analyzer |
- (A) P → (ii), Q → (iii), R → (iv), S → (i)
- (B) P → (ii), Q → (i), R → (iii), S → (iv)
- (C) P → (iii), Q → (iv), R → (i), S → (ii)
- (D) P → (i), Q → (iv), R → (ii), S → (iii)
Answer
Answer (C)
Answer from the official GATE CS 2017 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes