Assume that the operators +, -, × are left associative and ^ is right…

PYQ GATE 2004

Assume that the operators +, -, × are left associative and ^ is right associative. The order of precedence (from highest to lowest) is ^, x , +, -. The postfix expression corresponding to the infix expression a + b × c - d ^ e ^ f is

  1. A.

    abc × + def ^ ^ -

  2. B.

    abc × + de ^ f ^ -

  3. C.

    ab + c × d - e ^ f ^

  4. D.

    - + a × bc ^ ^ def

Attempted by 1213 students.

Sign up free to check your answer

Sign up free

Explore the full course: Data Structures

Loading lesson…