Gate CS-2018 Question Paper With Solutions

Q. 43 Consider the following parse tree for the expression a#b$c$d#e#f, involving two binary operators $ and #.

Gate CS-2018 Question Paper With Solutions

Which one of the following is correct for the given parse tree?

(A) $ has higher precedence and is left associative; # is right associative

(B) # has higher precedence and is left associative; $ is right associative

(C) $ has higher precedence and is left associative; # is left associative

(D) # has higher precedence and is right associative; $ is left associative

Answer: (A)

Explanation:

Gate CS-2018 Question Paper With Solutions

Learn More:   Gate CS-2011 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here