Multiple choice

Consider the following grammar: S$\rightarrow$SS S$\rightarrow$0 S$\rightarrow$$\epsilon$ Which of the following is true related to the given grammar? (i) It is ambiguous. (ii) It is left recursive. (iii) It is LL(1). (iv) It accepts 0+.

  1. iii only

  2. iii & iv

  3. I & ii

  4. i, ii & iv

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The grammar is not LL(1) because the grammar is ambiguous and left recursive. The regular expression for the language accepted by grammar is 0+.