Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion.P + ( Q - R ) * S / T - Zigya
Advertisement

Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion.
P + ( Q - R ) * S / T


Conversion of  the given Infix expression to its equivalent Postfix expression
(P+(((Q-R)*S)/T))

INFIX STACK POSTFIX
( (  
P ( P
+ (+ P
( (+( P
Q (+( PQ
- (+(- PQ
R (+(- PQR
) (+ PQR-
* (+* PQR-
S (+* PQR-S
/ (+/ PQR-S*
T (+/ PQR-S*T
)   PQR-S*T/+
244 Views

Advertisement

Linked List, Stack and Queue

Hope you found this question and answer to be good. Find many more questions on Linked List, Stack and Queue with answers for your assignments and practice.

Computer Science With CPP

Browse through more topics from Computer Science With CPP for questions and snapshot.