GATE CS 2007 · Arrays & Matrix Representation

MCQ · 1 mark · Problem PROG-DSTR-0127

The following postfix expression with single digit operands is evaluated using a stack: \(8 \ 2 \ 3 \ \;\hat{}\; / \ 2 \ 3 * + 5 \ 1 * -\) Note that \(\hat{}\;\) 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

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solutionOfficial GATE Answer Key: Option A.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/1236/gate2007-38-isro2016-27

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com