Showing posts with label infix to postfix. Show all posts
Showing posts with label infix to postfix. Show all posts

Saturday, May 18, 2013

Implement Infix to postfix conversion using Stack C source codes

We can implement a valid infix expression to a valid postfix expression using stacks in c as shown:





//C PROGRAM TO CONVERT GIVEN VALID INFIX EXPRESSION INTO POSTFIX EXPRESSION USING STACKS.

#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#define MAX 20

char stack[MAX];
int istack[MAX];
int top = -1;
char pop();
void push(char item);