1

Consider the grammar with the following translation rules and E as the start symbol. E → E1 # T { E.value = E1.value * T.value } | T{ E.value = T.value } T → T1 & F { T.value = T1.value + F.value } | F{ T.value = F.value } F → num { F.value = num.value } Compute E.value for the root of the parse tree for the expression: 2 # 3 & 5 # 6 & 4.

Correct Answer: 160

Make the most of this question

This page focuses on one Theory of Computation and Compiler Design question from Engineering. After checking the answer, return to the topic list to practice more or run a timed set.

Theory of Computation and Compiler Design MCQ: Consider the grammar with the following translation rules and E as the start symbol. E → E1 # T { E.value = E1.value * T.value } | T{ E.value = T.value } T → T1 & F { T.value = T1.value + F.value } | F{ T.value = F.value } F → num { F.value = num.value } Compute E.value for the root of the parse tree for the expression: 2 # 3 & 5 # 6 & 4. | Extra Education