GATE CS 2025 Set 1 | Question 46
Compiler Design › Parser · MSQ · 2 marks · Answer: A, D
- Question 46Compiler Designmsq2 marksWhich of the following statement(s) is/are TRUE while computing First and Follow during top-down parsing by a compiler?
- A.For a production , will be added to .✓
- B.If there is any input right end marker, it will be added to , where is the start symbol.
- C.For a production , will be added to .
- D.If there is any input right end marker, it will be added to , where is the start symbol.✓
Answer: A, D
Solution
Answer: (A) and (D) - (A) By definition, if then . True. - (D) The end-of-input marker is always placed in of the start symbol . True. - (B) The end-of-input marker goes into , never into any set. False. - (C) is never added to any set; sets contain only terminals and the end-of-input marker. False. - A.
More GATE PYQ on Parser
All GATE CS Compiler Design PYQ →Attempt GATE CS 2025 Set 1 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →