Infix To Prefix Conversion using Stack C Program

By | October 5, 2016

Learn how to convert an expression from Infix to Prefix using Stack in C Programming. This code for infix to prefix in c uses two arrays to store infix and prefix expression and a stack for conversion from infix to prefix expression.

Infix To Prefix Conversion Example

Infix String: X+Y/Z-M*N+O

Prefix String: +-+X/YZ*MNO

C Program For Infix To Prefix Conversion using Stack

Output

C Program To Convert Infix To Prefix Expression using Stack

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

Recommended Programs
C Program For Counting Sort Algorithm
C Program For Depth First Search Algorithm using Recursion
C Program To Evaluate a Prefix Expression using Stack
C Program For Prefix To Infix Expression Conversion
C Program For Postfix To Prefix Expression Conversion
C Program To Evaluate a Postfix Expression using Stack
C Program For Infix To Postfix Expression Conversion
C Program For Postfix To Infix Expression Conversion
C Program For Linear Search Algorithm
C Program To Implement Singly Linked List using Arrays

5 thoughts on “Infix To Prefix Conversion using Stack C Program

  1. Rehan Bala

    This is funny. I searched for infix to prefix conversion everywhere. Didnt get any working program. But, your program works. Thanks!

    Reply
  2. Parag Shah

    Prefix means operators before the operand and infix means operators within the operands, right?

    Reply
  3. AhmadH

    I copied your code in DEV even I tried many other codes of conversion but same problem appears on black screen when I give my expression and enters, screen disappears, its happening almost in every code

    Reply

Let's Discuss