English

Evaluation the following Postfix Expression: 15,3,2,+,/,7,+,2,*

Advertisements
Advertisements

Question

Evaluation the following Postfix Expression:

15,3,2,+,/,7,+,2,*

Evaluate
Advertisements

Solution

Stack evaluation:

  • 3 + 2 = 5
  • 15 / 5 = 3
  • 3 + 7 = 10
  • 10 × 2 = 20

Final answer: 20

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. b) | Page 123
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×