Sunday, 13 November 2011

C program to convert infix to postfix

This program converts a given infix expression to its equivalent postfix. It is done using stack. It considers operators +,-,*,/,^ and also brackets, it only does not checks whether the infix expression is correct or not. Here it first checks whether operatoe or not. If operator then it is inserted into stack on priority basis. If left bracket it is pushed onto stack and if a right bracket elements are popped from stack and added to postfix till a left bracket encountered. Otherwise if operand it is added to postfix.

Click to DOWNLOAD the C file from

No comments:

Post a Comment