GATE CS 2025 Set 1 — Question 46
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.MSQ+2 / -0EasyFirst & Follow SetsSyntax AnalysisCompiler Design
Compiler Design → Syntax Analysis → First & Follow Sets
Last updated
Question
Which of the following statement(s) is/are TRUE while computing and during top down parsing by a compiler?
Correct answer
(A) For a production A arrow ε, ε will be added to First(A).; (D) If there is any input right end marker, it will be added to Follow(S), where S is the start symbol.
Solution
Step-by-step analysis of the rules for computing and sets:
1.Rule for set: If is a production, then is added to . Thus, statement (A) is TRUE.
2.Rule for set of start symbol: The end-of-input marker (usually denoted by ) is always added to the set of the start symbol . Thus, statement (D) is TRUE.
3.Statement (B) is FALSE because the end marker is added to , not .
4.Statement (C) is FALSE because is never an element of any set. sets only contain terminal symbols and the end marker.
Continue learning with Success Tracker
A step still unclear? Work through it with support
Use Success Tracker to ask about the reasoning, then try another GATE CS question to check your understanding.
AI-powered practice· Unlimited practice on eligible plans
- PYQs with solutions
- Attempt available previous-year questions, then compare your reasoning with the worked solution. Coverage varies by stream.
- Practice that adapts
- Choose a topic, work on weaker areas and bookmark questions to revisit. Your attempts feed your progress tracking.
- AI doubt support
- Ask follow-up questions about a step or concept while practising, instead of stopping at the final answer.
Unlimited practice is available on eligible plans. Free practice and AI usage have limits; check the current plan allowances before choosing.
This page stays readable without an account. AI responses can be wrong; check them against the solution and source material.
More questions on Syntax Analysis
2026 Set 2 Q17In C runtime environment, which one of the following is stored in heap?2026 Set 2 Q19Consider the following three ANSI-C programs, P1, P2, and P3. P1 [code] P2 [code] **P3**…2026 Set 1 Q27Consider the following C statements: Which of the following options is/are correct? [figure]2026 Set 1 Q28Which of the following statements is/are true?2026 Set 2 Q35A lexical analyzer uses the following token definitions - - …