What is the equivalent infix expression of the following postfix expression?…
2021
What is the equivalent infix expression of the following postfix expression?
M, N, O, +, * , P, /, Q, R, S, T, /, +, * , −
- A.
O (M + N)/P − Q (R + S/T)
- B.
M (N + O)/Q − P (R/S + T)
- C.
N (M + O)/Q − P (S + R/T)
- D.
((M*(N+O))/P) − (Q*(R+(S/T)))
Attempted by 371 students.
Show answer & explanation
Correct answer: D
Here is a clean copy-paste explanation for the solution section:
Explanation:
Given postfix expression:
M N O + P / Q R S T / + −
Step 1: N O + → (N + O)
Step 2: M (N + O) → M(N + O)
Step 3: (M(N + O)) / P → (M(N + O)) / P
Step 4: S T / → (S / T)
Step 5: R + (S / T) → (R + S/T)
Step 6: Q (R + S/T) → Q(R + S/T)
Step 7: Final subtraction →
((M*(N+O))/P) − (Q*(R+(S/T)))
Final Answer: ((M*(N+O))/P) − (Q*(R+(S/T)))