Question:

Evaluate the given postfix expression:
Expression: 3 5 * 6 2 + 3 -

Updated On: Mar 29, 2025
  • 39
  • -9
  • 15
  • -17
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

The evaluation of the postfix expression 3 5 * 6 + 2 3 * - results in 15.

Additional Context:

  • Step-by-Step Evaluation:
    1. Push 3, push 5 → Stack: [3, 5]
    2. Apply * → 3*5=15 → Stack: [15]
    3. Push 6 → Stack: [15, 6]
    4. Apply + → 15+6=21 → Stack: [21]
    5. Push 2, push 3 → Stack: [21, 2, 3]
    6. Apply * → 2*3=6 → Stack: [21, 6]
    7. Apply - → 21-6=15 → Final result

Correct Answer: (3) 15.

Was this answer helpful?
0
0