Which variable does not drive a terminal string in grammar? S -> AB A -> a B…

2011

Which variable does not drive a terminal string in grammar? S -> AB A -> a B -> b B -> C

  1. A.

    A

  2. B.

    B

  3. C.

    C

  4. D.

    S

Attempted by 53 students.

Show answer & explanation

Correct answer: C

Variable C appears only on the right-hand side of B -> C and lacks any production rules. Unlike A, B, and S which derive terminals 'a' or 'b', C cannot generate a terminal string.

Explore the full course: Isro