...
UGC NET CS 2008 Dec-Paper-2
January 20, 2024
UGC NET CS 2008 Dec-Paper-2
January 20, 2024
UGC NET CS 2008 Dec-Paper-2
January 20, 2024
UGC NET CS 2008 Dec-Paper-2
January 20, 2024

ISRO CS-2023

Question 1
Consider the context-free grammar G below for arithmetic expressions :

E->E+E|E*E|id

Which of the following statements is TRUE:

A
The string “id + id x id” has no parse tree according to G
B
The string “id + id x id” has only one parse tree according to G

C
The string “id + id x id” has exactly two parse trees according to G
D
The string “id + id x id” has more than two parse trees according to G
Correct Answer: C
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments

E=E+E=E+E*E=id+id*id
Also reverse .so, parse trees=2

0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!