<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>postfix expression | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/postfix-expression/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sat, 09 Jun 2012 16:28:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>C Program for Evaluation of Postfix Expression 34*5+</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-for-evaluation-of-postfix-expression-345/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-for-evaluation-of-postfix-expression-345/#comments</comments>
		
		<dc:creator><![CDATA[Ansten Lobo]]></dc:creator>
		<pubDate>Sat, 09 Jun 2012 16:28:06 +0000</pubDate>
				<category><![CDATA[Data Structures]]></category>
		<category><![CDATA[c program]]></category>
		<category><![CDATA[postfix expression]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=3301</guid>

					<description><![CDATA[<p>Source: Dr. G T Raju, Professor &#038; Head, Dept. of CSE, RNSIT #define SIZE 50 /* Size of Stack */ #include int s[SIZE]; int top=-1; /* Global declarations */ push(int elem) { /* Function for PUSH operation */ s[++top]=elem; } int pop() { /* Function for POP operation */ return(s[top--]); } main() { /* Main</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-for-evaluation-of-postfix-expression-345/">C Program for Evaluation of Postfix Expression 34*5+</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Source: Dr. G T Raju, Professor &#038; Head, Dept. of CSE, RNSIT</p>
<pre lang="C" line="1">
#define SIZE 50            /* Size of Stack */
#include <ctype.h>
int s[SIZE];
int top=-1;       /* Global declarations */

push(int elem)
{                       /* Function for PUSH operation */
    s[++top]=elem;
}

int pop()
{                      /* Function for POP operation */
    return(s[top--]);
}

main()
{                         /* Main Program */
    char pofx[50],ch;
    int i=0,op1,op2;
    printf("\n\nRead the Postfix Expression ? ");
    scanf("%s",pofx);
    while( (ch=pofx[i++]) != '\0')
    {
        if(isdigit(ch)) push(ch-'0'); /* Push the operand */
        else
        {        /* Operator,pop two  operands */
            op2=pop();
            op1=pop();
            switch(ch)
            {
            case '+':push(op1+op2);break;
            case '-':push(op1-op2);break;
            case '*':push(op1*op2);break;
            case '/':push(op1/op2);break;
            }
        }
    }
    printf("\n Given Postfix Expn: %s\n",pofx);
    printf("\n Result after Evaluation: %d\n",s[top]);
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-for-evaluation-of-postfix-expression-345/">C Program for Evaluation of Postfix Expression 34*5+</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-for-evaluation-of-postfix-expression-345/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>C program which converts given expression into its post-fix format</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-which-converts-given-expression-into-its-post-fix-format/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-which-converts-given-expression-into-its-post-fix-format/#comments</comments>
		
		<dc:creator><![CDATA[Drithi]]></dc:creator>
		<pubDate>Thu, 07 Jun 2012 09:15:38 +0000</pubDate>
				<category><![CDATA[Data Structures]]></category>
		<category><![CDATA[c program]]></category>
		<category><![CDATA[Data structure]]></category>
		<category><![CDATA[postfix expression]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=3149</guid>

					<description><![CDATA[<p>Below C program converts a given expression into its post-fix format #include #include #include char s[20]; int top=-1; void main() { char str[20]; char ch; int i; char pop(); void push(char); int precd(char); s[top]='#'; clrscr(); printf("\n\t\tOUTPUT"); printf("\n\tEnter the expression:"); gets(str); printf("\n\tpostfix notation:"); for(i=0;str[i]!='\0';i++) { if(isalpha(str[i])) { printf("%c",str[i]); continue; } if(str[i]==')') { while((ch=pop())!='(') printf("%c",ch); } else</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-which-converts-given-expression-into-its-post-fix-format/">C program which converts given expression into its post-fix format</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Below C program converts a given expression into its post-fix format</p>
<pre lang="c" line="1">
#include<stdio.h>
#include<ctype.h>
#include<conio.h>
char s[20];
int top=-1;
void main()
{
    char str[20];
    char ch;
    int i;
    char pop();
    void push(char);
    int precd(char);
    s[top]='#';
    clrscr();
    printf("\n\t\tOUTPUT");
    printf("\n\tEnter the expression:");
    gets(str);
    printf("\n\tpostfix notation:");
    for(i=0;str[i]!='\0';i++)
    {
        if(isalpha(str[i]))
        {
            printf("%c",str[i]);
            continue;
        }
        if(str[i]==')')
        {
            while((ch=pop())!='(')
                printf("%c",ch);
        }
        else if(str[i]=='(')
            push(str[i]);
        else if(precd(str[i])<=precd(s[top]))
        {
            printf("%c",pop());
            push(str[i]);
        }
        else
            push(str[i]);
    }
    while(top>=0)
        printf("%c",pop());
    getch();
}
void push(char st)
{
    s[++top]=st;
}
char pop()
{
    char st;
    st=s[top--];
    return(st);
}

int precd(char s)
{
    switch(s)
    {
    case '$':return(4);
    case '*':
    case '/': return(3);
    case '+':
    case '-': return(2);
    case '(': return(1);
    case '#': return(-1);
    }
    return(0);
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-which-converts-given-expression-into-its-post-fix-format/">C program which converts given expression into its post-fix format</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-which-converts-given-expression-into-its-post-fix-format/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
