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 thread and types of thread?
What is array and its types in data structure?
How efficient is binary search?
What is the maximum size of array?
How helpful is abstract data type of data structures?
What are the advantages of sorting?
How do I start preparing for placement?
Why is reflection slower?
What is the difference between collections class vs collections interface?
Define graph traversals?
What is the difference between b tree and binary search tree?
Is bucket sort a comparison sort?
What is collection sort?
What is reduction to sorting method?
Which sorting algorithm is used in arrays sort?