← Quiz: CFG and PDA: all 10 questions
Quiz: CFG and PDA · Question 7 of 10
A grammar is ambiguous when:
A grammar is ambiguous when:
- A.It has more than one variable
- B.It generates an infinite language
- C.Some string has two different parse trees
- D.It uses ε-rules
Answer & explanation
Correct answer: Some string has two different parse trees
Two parse trees mean two ways of grouping, like 2 + 3 * 4 giving 14 or 20.
Can you get the rest right without peeking?
Take the timed Quiz: CFG and PDA quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →