GATE CS 2025, set 1 · Question 46 · Compiler Design · Multiple select (MSQ) · 2 marks · no negative marks

Which of the following statement(s) is/are TRUE while computing First and Follow during top down parsing by a compiler?

  1. (A) For a production A → ε, ε will be added to First(A).
  2. (B) If there is any input right end marker, it will be added to First(S), where S is the start symbol.
  3. (C) For a production A → ε, ε will be added to Follow(A).
  4. (D) If there is any input right end marker, it will be added to Follow(S), where S is the start symbol.
Answer

Answer (A), (D)

Answer from the official GATE CS 2025 answer key.

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