Skip to content
GATEiit

GATE CSE 2025 Session 1 Q46: Rules for computing FIRST and FOLLOW sets

Question

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

Try it: multiple select: one or more correct options

Select one or more options
Select all correct options. No negative marking, no partial marks.
Show answer and explanation

Answer: A, D (official GATE 2025 final answer key)

Concept used: FIRST sets may contain ϵ\epsilon; FOLLOW sets never do, but FOLLOW of the start symbol always contains the right end marker.

First step: Recall the base rules: A→ϵA \to \epsilon puts ϵ\epsilon in FIRST(A), and the right end marker is placed in FOLLOW(S) before anything else.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2025 Session 1 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key