123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

   Computer Science / IT
   Electronics
   Electrical
   Mechanical
   Chemical
   Civil

   CAT / MBA

   GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use

Displaying  Source Code(s)  
 

 
prefix to postfix conversion

--------------------------------------------------------------------------------

Description : when a prefix string is entered it converts it into its equivalent postfix string. Be careful to enter the perfect prefix string to get the desired results.

#include<stdio.h>
#include<conio.h>
#include<alloc.h>
#include<string.h>
#include<ctype.h>
struct node
{
char a[20];
struct node*next;
};
void push(struct node**p,char a[20])
{
struct node*temp;
if(*p==NULL)
{
(*p)=(struct node*)malloc(sizeof(struct node));
(*p)->next=NULL;
strcpy((*p)->a,a);
}
else
{
temp=(struct node*)malloc(sizeof(struct node));
strcpy(temp->a,a);
temp->next=(*p);
(*p)=temp;
}
}
char*pop(struct node**p)
{
char *a;
a=(*p)->a;
(*p)=(*p)->next;
return a;
}
void convert(char*s)
{
int i=0;
char a[20],b[20];
char*x,*y;
struct node*stack=NULL;
strrev(s);
while(s[i]!='
 

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG