πŸ“Š Theory of Computation and Compiler Design
Q. Consider the grammar defined by the following production rules, with two
operators ∗ and +
S --> T * P
T --> U | T * U
P --> Q + P | Q
Q --> Id
U --> Id
Which one of the following is TRUE?
  • (A) + is left associative, while ∗ is right associative
  • (B) + is right associative, while ∗ is left associative
  • (C) Both + and ∗ are right associative
  • (D) Both + and ∗ are left associative
πŸ’¬ Discuss
βœ… Correct Answer: (B) + is right associative, while ∗ is left associative

You must be Logged in to update hint/solution

πŸ’¬ Discussion

πŸ“Š Question Analytics

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