GATE CS 1991 · Arrays & Matrix Representation

MCQ · 1 mark · Problem PROG-DSTR-0274

Choose the correct alternatives (more than one may be correct) and write the corresponding letters only:The following sequence of operations is performed on a stack:PUSH (10), PUSH (20), POP, PUSH (10), PUSH (20), POP, POP, POP, PUSH (20), POPThe sequence of values popped out is
  1. A
    20,10,20,10,20
  2. B
    20,20,10,10,20
  3. C
    10,20,20,10,20
  4. D
    20,20,10,20,10

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

Show the worked solutionOfficial GATE Answer Key: Option B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/522/gate1991-03-vii

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