πŸ“Š Theory of Computation and Compiler Design
Q. 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.
  • (A) 200
  • (B) 180
  • (C) 160
  • (D) 40
πŸ’¬ Discuss
βœ… Correct Answer: (C) 160

You must be Logged in to update hint/solution

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
934
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
80%
Success Rate