The result evaluating the postfix expression 10 5 + 60 6 / * 8 − is

This question was previously asked in
GATE CS 2015 Official Paper: Shift 3
View all GATE CS Papers >
  1. 284
  2. 213
  3. 142
  4. 71

Answer (Detailed Solution Below)

Option 3 : 142
Free
GATE CS Full Mock Test
5.3 K Users
65 Questions 100 Marks 180 Mins

Detailed Solution

Download Solution PDF

Calculation:

Postfix expression 10 5 + 60 6 / * 8 −

PUSH: 10 and 5(TOS)

10 5

Add: 10 + 5 = 15

PUSH: 15 60 6 (TOS)

15 60 6

Divide: 60/6 = 10

PUSH: 10

15 10

Multiply: 15 × 10 = 150

PUSH: 150 and 8

150 8

Subtract: 150 - 8 = 142

Diagram:

z,036

Evaluate Infix notation:

(((10 + 5) * (60 / 6)) - 8)  = ((15 * 10) - 8) = 150 - 8 = 142

Latest GATE CS Updates

Last updated on Jan 8, 2025

-> GATE CS 2025 Admit Card has been released on 7th January 2025.

-> The exam will be conducted on 1st February 2025 in 2 shifts.

-> Candidates applying for the GATE CE must satisfy the GATE Eligibility Criteria.

-> The candidates should have BTech (Computer Science). Candidates preparing for the exam can refer to the GATE CS Important Questions to improve their preparation.

-> Candidates must check their performance with the help of the GATE CS mock tests and GATE CS previous year papers for the GATE 2025 Exam.

Get Free Access Now
Hot Links: teen patti wealth teen patti vungo teen patti gold download apk