Write a C Program to convert Prefix into INFIX Expression

By | December 3, 2016

C Program to convert Prefix into INFIX


Write a C Program to convert Prefix into INFIX Expression.Here’s a Simple Program To Convert Prefix To Infix Notation using Stack in C Programming Language.

The Prefix notation is also known as Polish Notation.


Prefix To Infix Example :


Prefix String : : + A B C

Infix String  : : ((A+B)C)


Algorithm :


  1. The Reversed Prefix Expression is pushed on the Stack.
  2. If the Stack is not Empty, then Pop the elements from the Stack
  3. If the popped character is an Operator
    1. Input Opening Parantheses ‘(‘ and print it on the console.
    2. Display popped character from the Stack.
    3. Input Closing Parantheses ‘)’ and print it on the console.
  4. If the popped character is an empty space, then print it on the console.
  5. Repeat the steps till the Prefix expression is not scanned completely.

Below is the source code for C Program to convert Prefix into INFIX Expression which is successfully compiled and run on Windows System to produce desired output as shown below :


SOURCE CODE : :



OUTPUT : :



If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach upto you in the short interval.


Thanks for reading the post.

Leave a Reply