What will be the output in postfix notation of the following infix notation:-
x * y + z 3 *(4 + 5) (x + y)/(z * 5)
What will be the output in postfix notation of the following infix notation:-
x * y + z 3 *(4 + 5) (x + y)/(z * 5)
Solution
✅ Correct Option: 2
Postfix places each operator after its two operands. Brackets are done first, and * and / are applied before +.
| Infix | Working | Postfix |
|---|---|---|
| is formed first, then | xy*z+ | |
| bracket gives , then and | 345+* | |
| and , then | xy+z5*/ |
Joining the three gives xyz+ 345+ xy+z5*/.
Options 1 and 3: the operators come before their operands, which is prefix form, not postfix.
Option 4: "345++*" is invalid, because the second + has no operand left, and the extra * at the end has no operands either.
Related questions:
2026: 23 May Shift 1
2026: 11 May Shift 2
2026: 19 May Shift 1