GATE CS 2017, set 1 · Question 17 · Compiler Design · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

Consider the following grammar:
P → xQRS ; Q → yz | z ; R → w | ε ; S → y
What is FOLLOW(Q)?

  1. (A) {R}
  2. (B) {w}
  3. (C) {w, y}
  4. (D) {w, }
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