## Infix to Postfix Expression Conversion : Fast Method

Conversion of an Expression : Infix to Postfix Manual Method
Question : Convert Following Expression Into Postfix ??

```(A + B ^ C ) * D + E
Step 1 :

Expression Wrapped in Round Bracket Should be Evaluated Firstly.
Again Bracket Contain Two Operators – Addition(+) and Raise to(^) .
Out of these two ‘^’ Operator has Higher Priority.
So “B^C” should be Evaluated First

(A + B ^ C ) * D + E= (A + B C ^ ) * D + E    [B^C Converted Into BC^]

Now [ B C ^ ] is Converted Expression So Consider it as X

= (A + X ) * D + E    [X = BC^]
Step 2 :

Evaluate A + X

(A + X ) * D + E= (A X + ) * D + E    [A+X Converted Into AX+]

Now [ A X + ] is Converted Expression So Consider it as Y

= Y * D + E    [Y = AX+]
Step 3 :

Evaluate Y * D

Y * D + E= Y D * + E    [Y*D Converted Into YD*]

Now [Y D * ] is Converted Expression So Consider it as Z

= Z + E    [Z = YD*]
Step 4 :

Evaluate Z + E

Z + E= Z E +    [Z+E Converted Into ZE+]
Final Postfix Expression :
= Z E +    = Y D * E +          [Put Value of Z]= A X + D * E +      [Put Value of Y]= A B C ^ + D * E +  [Put Value of X]

var disqus_config = function () {
this.page.url = PAGE_URL;  // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://programmingtutorials.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
})();

Previous Page

Next Page