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

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

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

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

Ans: $ has higher precedence and is left associative; # is right associative

Gkseries: Gkseries.com is a premier website to provide complete solution for online preparation of different competitive exams like UPSC, SBI PO, SBI clerical, PCS, IPS, IAS, IBPS PO, IBPS Clerical exam etc. & other graduate and post-graduate exams. Learn more on about us page