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
Answer: C. 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…
- A.
A
- B.
B
- C.
C
- D.
S
Attempted by 164 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: Iocl Engineers Officers Grade A Paper 2
Loading lesson…