Computer Science EngineeringHard

For the grammar S -> aSb | c, what is FIRST(S)?

  1. A. {a}
  2. B. {c}
  3. C. {a, c}
  4. D. {b, c}

Correct answer: C. {a, c}

S begins with a in the first production and with c in the second.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic