(44 Views)

Infix notation is a type of notation in which arithmetic expressions are written in a manner such that the operators appear in between the operands.

Prefix notation is a type of notation in which arithmetic expressions are written in a manner such that the operands appear after operators. Let's see how to convert Prefix to Infix.

Let's take an example to understand *a+bc,

- Reading from right to left, we scan the operands 'c' 'b' respectively and push it into the the stack.
- '+' is scanned and operands 'c', 'b' are popped and concatenated in form of b+c
- 'a' is then pushed into the stack.
- '*', is encountered and 'a' and string 'b+c' is popped and concatenated to give a string a*(b+c)
- Postfix form is obtained: a*(b+c)

You might be interested in this too.:

0 UpvotesUpvote |
0 DownvotesDownvote |

- Debug Javascript code in Android Mobile Browser [1670 Views]
- Postfix to Prefix notation Algorithm and Flowchart [94 Views]
- Algorithm to find Maximum of 3 numbers [6925 Views]
- C++ Program To Reverse Array Elements Using Function [33 Views]
- Prefix to Postfix Notation Algorithm and Flowchart [47 Views]

- Algorithm to find whether number is Armstrong Number or Not [38404 Views]
- How To Win Ludo King Game Every Time [38198 Views]
- Knuth-Morris-Pratt (KMP) Substring Search Algorithm with Java Example [27136 Views]
- Jio Phone hang on LOGO problem Solution - Hard Reset Jio Phone [26928 Views]
- FlowChart and Algorithm to find Whether a Number is Even or Odd [19366 Views]