6,227 views

2 Answers

Best answer
4 votes
4 votes
POSTFIX EVALUATION ALGO

1) push the operands  in stack when  operator X comes take top 2 values say A and B  and perform B X A and store the result at top  of stack

2)Repeat the procedure till end of expression

here push 8 3 4 now +comes 3+4=7 stack now contains 8 7 now - comes so 8-7=1 stack now has 1

push 3 8 2 now / comes perform 8/2=4 then +comes 3+4 =7 stack now has 1  7 then * comes stack now has 7*1=7

now push 2  $ (power )comes perform 7^2=49 push 3    +comes  stack now has 49 3 perform 49+3=52

hence final ans is D
selected by
0 votes
0 votes

834+-382/+*2$3+

=87-382/+*2$3+

=1382/+*2$3+

=134+*2$3+

=17*2$3+

=72$3+

=49 3 +

=52

Hence,Option(D)52.

Answer:

Related questions

3 votes
3 votes
1 answer
2
go_editor asked Jul 14, 2016
4,042 views
A virtual memory based memory management algorithm partially swaps out a process. This is an example ofshort term schedulinglong term schedulingmedium term schedulingmutu...
2 votes
2 votes
1 answer
3
2 votes
2 votes
3 answers
4