Convert following infix expression to the prefix expression.
a - b + c * (d / e - (f + g))
Answer Posted / elle
a-b+c*(d/e-(f+g))
=a-b+c*(/de-(+fg))
=a-b+c*(T-S) where T=/de,S=+fg
=a-b+c*-(TS)
=-ab+c*-(TS)
=-ab+c*V where V=-TS
=-ab+*cV
=X+Y where X=-ab,*cV=Y
=+XY
=+-ab*cV
=+-ab*c-TS
=+-ab*c-/de+fg
| Is This Answer Correct ? | 41 Yes | 7 No |
Post New Answer View All Answers
What is the order of selection sort?
What is raid (redundant array of inexpensive disks)? Explain its level?
How do you find the index of an element in an arraylist?
What is data structure and its operations?
What is difference between data type and variable?
Explain about set and their types in a collection?
What is the similarity between a Structure, Union and enumeration?
Define left-in threaded tree?
When should structures be passed by values or by reference?
What is a dequeue?
What happens if an array goes out-of-bounds?
Can you please explain the difference between array_name and &array_name?
Write a data structure for a queue.
How do you clear a stack?
Which is better merge or quick sort?