Question:

What is the postfix expression of $P + Q / R * (S - P)$?

Show Hint

Postfix expressions evaluate left-to-right; write operands first, then operators.
Updated On: June 02, 2025
  • PQRSP/-*+
  • +P/Q*R-SP
  • PQRSP/-*+
  • **-/PQRSP
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Given infix expression: \(P + \frac{Q}{R} \times (S - P)\)
First convert to postfix:
- \(Q / R \rightarrow QR/\)
- \(S - P \rightarrow SP-\)
- Then \(QR/ \times SP- \rightarrow QR/SP/-*\)
- Finally add P: \(P QR SP/- * +\)
Was this answer helpful?
0
0

Top Questions on Programming and Data Structures

View More Questions

TS PGECET Notification