The result evaluating the postfix expression 10 5 + 60 6 / * 8 - is
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2015 Set 3 · Q12
Time
Select one answerSingle correct
Solution
Official answer: C) 142
StacksTo evaluate the postfix expression , we scan the tokens from left to right using a stack:
Push : Stack
Push : Stack
Operator +: Pop and , compute , push . Stack
Push : Stack
Push : Stack
Operator /: Pop and , compute , push . Stack
Operator *: Pop and , compute , push . Stack
Push : Stack
Operator -: Pop and , compute , push . Stack
The final result is 142.
Try the question first, then check your work.
Examiner trap
Use a stack to evaluate the postfix expression by pushing operands and popping two operands whenever an operator is encountered.
This Stacks previous year question is Q12 of the GATE CSE 2015 Set 3 paper. Find more GATE CSE PYQs on Stacks in Programming and Data Structures, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 3 related Stacks PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Stacks has 3 GATE CSE PYQs across 3 papers from 2015 to 2025. This is the only 1-mark MCQ among them, and it is the only one in GATE CSE 2015 Set 3.
How GATE tests StacksIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.