Examveda

Consider the given syntax tree. Assume that division has the lowest precedence than addition, subtraction and multiplication. Addition and subtraction have the same precedence but more than multiplication. Which of the following expression can be given by the following syntax tree?
Trees in Data Structures mcq question image

A. [5 / (p + q) * (q - r)]

B. [5 * (p + q) / (q - r)]

C. [5 + (p + q) * (q - r)]

D. [5 / (p + q) + (q - r)]

Answer: Option A


This Question Belongs to Data Structure >> Trees In Data Structures

Join The Discussion

Related Questions on Trees in Data Structures