Postfix To Infix Conversion C Program

C Program To Convert Postfix To Infix using Stack

Learn How To Convert Postfix To Infix Notation using Stack in C Programming Language. The Postfix notation is also known as Reverse Polish Notation. Before you proceed further with this code, you must know the complete operations of stack data structure.

Postfix To Infix Conversion Example

Postfix String: 66+

Infix String: 6 + 6

Algorithm To Convert Postfix Expression into Infix Notation


  1. Scan the Postfix String from Left to Right.
  2. If the character is an Operand, then Push it on to the Stack.
  3. If the character is an Operator, then Pop Operator 1 and Operand 2 and concatenate them using Infix notation where the Operator is in between the Two Operands.
  4. The resultant expression is then pushed on the Stack
  5. Repeat the above steps till the Postfix string is not scanned completely.
  6. Use parantheses properly to ensure correct order for evaluating the final expression.

C Program For Postfix To Infix Conversion using Stack Data Structure


C Program For Postfix To Infix Conversion using Stack

In case you get any compilation errors or any doubts in this C Program For Conversion of Postfix Expression into Infix Expression, let us know about it in the Comment Section below.

Recommended Programs
C Program For Merge Sort Algorithm
C Program For Infix To Postfix Expression Conversion
C Program To Evaluate Prefix Notation using Stack
C Program For Prefix To Infix Expression Conversion
C Program For Postfix To Prefix Expression Conversion
C Program To Evaluate a Postfix Notation using Stack
C Program For Infix To Prefix Expression Conversion
C Program For Depth First Search Algorithm
C Program To Evaluate A Polynomial
C Program To Solve Travelling Salesman Problem

Tushar Soni

I am Tushar Soni, Co - Founder of CodingAlpha. I am a computer science student from India and passionate about Web Development and Programming. Connect with me on Facebook | LinkedIn | Google Plus

One thought on “Postfix To Infix Conversion C Program

  • March 16, 2017 at 9:04 pm

    I have detected a bug in your code if i input let’s say the expression xy-z-uv+/ the infix that i am getting is x-y-z+v/u which is wrong the correct infix is (x-y-z)/(u+v)


Join The Discussion