A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Important Notice!

Dear users, compscibits.com is now permanently moved to compsciedu.com. Please update all your links and bookmarks accordingly. Soon, the site will be accessible through URL compsciedu.com only.

Discussion Forum

Que. Consider the context-free grammar E → E + E E → (E * E) E → id
where E is the starting symbol, the set of terminals is {id, (,+,),*}, and the set of nonterminals is {E}.
Which of the following terminal strings has more than one parse tree when parsed according to the above grammar?
a. id + id + id + id
b. id + (id* (id * id))
c. (id* (id * id)) + id
d. ((id * id + id) * id)
Answer:id + id + id + id
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: