The following postfix expression with single digit operands is evaluated using…

GATE · 2007 · CSTPSC Computer/IT Posts · 2025 · Senior Informatics Officer · Section DModified — slightly modified from the official paper; see the solutionISRO Scientist/Engineer SC · 2016 · Computer Science

The following postfix expression with single digit operands is evaluated using a stack:

8 2 3 ^ / 2 3 * + 5 1 * - 

Note that ^ is the exponentiation operator. The top two elements of the stack after the first * is evaluated are:

  1. A.

    6, 1

  2. B.

    5, 7

  3. C.

    3, 2

  4. D.

    1, 5

Attempted by 209 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…