Consider the following parse tree for the expression a#b$c$d#e#f, involving…

PYQ GATE 2018

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?

  1. A.

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

  2. B.

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

  3. C.

    $ has higher precedence and is left associative; # is left associative

  4. D.

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

Attempted by 207 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…