What is the value of the postfix expression 6,5,3,+,9,*+
Answers
Answered by
0
the distance selling regulations
Answered by
0
Concept:
A single letter or operator preceded by two postfix strings forms a postfix expression. The first and second operands are followed by an operator in every postfix string longer than a single variable.
Given:
The postfix expression
Find:
The value of postfix expression.
Solution:
Step 1:
Push into the stack.
Contents in the stack:
Step 2:
Pop and perform addition . Now, push into the stack.
Contents in the stack: .
Step 3:
Push into the stack.
Step 4:
Pop and perform multiplication. Now, push the result into the stack.
Contents in the stack: .
Step 5:
Pop and perform addition. Now, push the result into the stack.
Contents in the stack: .
Hence, the value of the expression is .
Similar questions