...
Question 8747 – CPU-Scheduling
April 15, 2024
Question 17370 – NTA UGC NET Dec 2023 Paper-2
April 16, 2024
Question 8747 – CPU-Scheduling
April 15, 2024
Question 17370 – NTA UGC NET Dec 2023 Paper-2
April 16, 2024

Question 8454 – Prefix-Postfix-Expression

The prefix equivalent of the following infix expression is:
a / b – c + d * e – a * c

Correct Answer: A

Question 1 Explanation: 
a / b – c + d * e – a * c
* Start scanning the expression from RHS.
* Push the operators on the top of the stack by ensuring that only high priority operator can be pushed over a low priority operator.
* If a low priority operator is encountered in expression while scanning it, and if top of stack have high priority operator then pop it and after that push low priority operator on top of stack.
* Print each operand just after scanning it.




A
– + – / a b c * d e * a c
B
+ – – / a b c * d e * a c
C
– + / a b c – * d e * a c
D
– – + / a b c * d e * a c
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!