Vidyalelo
Data Structure · Q87

Trees in Data Structures

Programming · Data Structure · question 87

Q87

Suppose X is the starting symbol of the given grammar with the following transition rules. Compute the value of X as the root of the parse tree for the expression: 3 & 4 % 7. X → X1 & B | B X.value = X1.value + B.value, X.value = B.value B → B1 % D | D B.value = B1.value * D.value, B.value = D.value D → num D.value = num.value

A.
31
Answer
B.
32
C.
33
D.
34

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board