2 votes

Convert the following infix expression into its equivalent post fix expression $ (A + B$^$ D) / (E – F) + G $

- $ABD$^ $+EF – / G+$
- $ABD + $^$EF – / G+$
- $ABD +$ ^$EF / – G+$
- $ABD$^ $+ EF / – G+$

3 votes

Best answer

**Answer : A**

Given Expression is **(A + B^D ) / (E - F) + G**

first we look at precedence and associativity and a/c to that **"()"** has higher precedence among all operators so we are going to evaluate them first .Lets take this first **(A + B^D ) **

inside this again we have 2 operators one is **"+"** and other is **"^"** in which Exponentiation operator has higher precedence .so

it will evaluate it like this

**A+ BD^** then **ABD^+** now let move to the second one which is **(E - F) ** it will be **EF-** till now we have

**ABD^+ / EF- + G**

Now among both operators which has to be evaluated **"/"** has higher precedence so we'll evaluate it first

**ABD^+EF- /+ G**

now finally we are going to evaluate **"+" **

**Final Postfix expression will be ABD^+EF-/G+**