evaluate the following postfix expression ABC*D/+ where A=2 B=3C=4D=6
Answers
9×6
54
is the sln to ur question
4 is the postfix expression ABC×D÷+ when A=2, B=3, C=4, D=6 by stack and scanned symbols.
Given that,
We have to evaluate the postfix expression ABC×D÷+ when A=2, B=3, C=4, D=6.
We know that,
Take the postfix expression ABC×D÷+
In the postfix expression two steps are there
They are
Step1- when there is a number or variable we just take same
Step2- when there is an operation like +, -, ×, ÷ then we have to take the operation for the last two numbers or variables.
So,
ABC×D÷+
Symbol scanned | stack
A | A
B | A,B
C | A,B,C
× | A,(B×C)
D | A, (B×C), D
÷ | A,
+ | A+
So,
A+ (() = 2+
= 2+
= 2+ 2
=4
Therefore, 4 is the postfix expression ABC×D÷+ when A=2, B=3, C=4, D=6 by stack and scanned symbols.
To learn more about expression visit:
https://brainly.in/question/54139973
https://brainly.in/question/13401252
#SPJ3