English

Evaluation the following Postfix Expression: 20,8,4,/,2,3,+,*,-

Advertisements
Advertisements

Question

Evaluation the following Postfix Expression:

20,8,4,/,2,3,+,*,-

Evaluate
Advertisements

Solution

Stack evaluation:

  • 8 / 4 = 2
  • 2 + 3 = 5
  • 2 × 5 = 10
  • 20 − 10 = 10

Final answer: 10

shaalaa.com
  Is there an error in this question or solution?
Chapter 6: Stacks & Queues in list - EXERCISE [Page 123]

APPEARS IN

CBSE Computer Science with Python [English] Class 12
Chapter 6 Stacks & Queues in list
EXERCISE | Q 11. a) | Page 123
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×