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

GATE · 2004 · CSISRO Scientist/Engineer SC · 2009 · Computer Science

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 1010 students.

Show answer

Correct answer: A

The worked solution is available to enrolled students.

Video solution available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…