What would be the prefix notation for the given equation? (a+(b/c)∗(d^e)−f)
2022
What would be the prefix notation for the given equation? (a+(b/c)∗(d^e)−f)
- A.
+-a*/bcdef
- B.
-+ab/c^def
- C.
-+a*/bc^def
- D.
-+fa*/bc^de
Attempted by 493 students.
Show answer & explanation
Correct answer: C
To convert the infix expression (a+(b/c)*(d^e)-f) to prefix notation, follow these steps:
Identify the innermost expressions: (b/c) and (d^e).
Convert (b/c) to prefix: /bc.
Convert (d^e) to prefix: ^de.
Multiply the results: */bc^de.
Add a to the product: +a*/bc^de.
Subtract f from the sum: -+a*/bc^de.
Final prefix notation: -+a*/bc^de.