Exam-style question
Try this first
A syntax diagram has a path from Start to End that passes through "A" and then an optional section containing "B". Which set contains all the strings accepted by this diagram?.
- A.A and AB
- B.B and BA
- C.A only
- D.AB only
Answer and explanation
Concise answer
A and AB
Why this is correct
The diagram requires "A" and allows the section containing "B" to be skipped or followed. The accepted strings are therefore "A" and "AB".
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
