Friday 19 August 2016

Evaluation of Postfix Expression Example 1

Evaluation of Postfix Expression 

Example 1:

Evaluate the following Postfix Expression: 62/3-42*+



Symb
Operand1
Operand2
Value
Operand Stack
6



6
2



6, 2
/
6
2
3
3
3



 3, 3
-
3
3
0
0
4



0, 4
2



0, 4, 2
*
4
2
8
0, 8
+
0
8
8
8 (Result)

4 comments:

  1. put some problems of brackets, i.e 3+4*2/(9-5)^4

    ReplyDelete
    Replies
    1. hi,
      do you want conversion from infix to postfix or evaluation of postfix expression?

      https://tejaswinihbhat.blogspot.in/2016/08/conversion-of-infix-expression-to-postfix-example-3.html

      https://tejaswinihbhat.blogspot.in/2016/08/Conversion-of-Infix-expression-to-Postfix-expression-Example-4.html

      https://tejaswinihbhat.blogspot.in/2016/08/Convertion-of-Infix-expression-to-Postfix-expression.html

      https://tejaswinihbhat.blogspot.in/2016/08/conversion-of-infix-expression-to-postfix-example2.html


      Delete
  2. Good Blog to refer...

    ReplyDelete