<?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>data structures | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/data-structures/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 11:16:18 +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 to implement queue operations</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-to-implement-queue-operations/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-to-implement-queue-operations/#respond</comments>
		
		<dc:creator><![CDATA[Drithi]]></dc:creator>
		<pubDate>Tue, 05 Jun 2012 09:43:43 +0000</pubDate>
				<category><![CDATA[Data Structures]]></category>
		<category><![CDATA[c programs]]></category>
		<category><![CDATA[Queue]]></category>
		<category><![CDATA[data structures]]></category>
		<category><![CDATA[queue operations]]></category>
		<category><![CDATA[queue underflow]]></category>
		<category><![CDATA[queue overflow]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=3129</guid>

					<description><![CDATA[<p>Below is the C program to implement various queue operations, #include #include #define max 5 int q[10],front=0,rear=-1; void main() { int ch; void insert(); void delet(); void display(); clrscr(); printf("\nQueue operations\n"); printf("1.insert\n2.delete\n3.display\n4.exit\n"); while(1) { printf("Enter your choice:"); scanf("%d",&#038;ch); switch(ch) { case 1: insert(); break; case 2: delet(); break; case 3:display(); break; case 4:exit(); default:printf("Invalid option\n");</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-to-implement-queue-operations/">C program to implement queue operations</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Below is the C program to implement various queue operations,</p>
<pre lang="c" line="1">
#include<stdio.h>
#include<conio.h>
#define max 5
int q[10],front=0,rear=-1;
void main()
{
    int ch;
    void insert();
    void delet();
    void display();
    clrscr();
    printf("\nQueue operations\n");
    printf("1.insert\n2.delete\n3.display\n4.exit\n");
    while(1)
    {
        printf("Enter your choice:");
        scanf("%d",&ch);
        switch(ch)
        {
        case 1: insert();
            break;
        case 2: delet();
            break;
        case 3:display();
            break;
        case 4:exit();
        default:printf("Invalid option\n");
        }
    }
}

void insert()
{
    int x;
    if(rear==max-1)
        printf("Queue is overflow\n");
    else
    {
        printf("Enter element to be insert:");
        scanf("%d",&x);
        q[++rear]=x;
    }
}
void  delet()
{
    int a;
    if((front==0)&&(rear==-1))
    {
        printf("Queue is underflow\n");
        getch();
        exit();
    }
    a=q[front++];
    printf("Deleted element is:%d\n",a);
    if(front>rear)
    {
        front=0;
        rear=-1;
    }
}

void display()
{
    int i;
    if(front==0&&rear==-1)
    {
        printf("Queue is underflow\n");
        getch();
        exit();
    }
    for(i=front;i<=rear;i++)
        printf("\t%d",q[i]);
    printf("\n");
}
getch();
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/data-structures-c/c-program-to-implement-queue-operations/">C program to implement queue operations</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-to-implement-queue-operations/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>C Program which performs stack operations</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-which-performs-stack-operations/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-which-performs-stack-operations/#comments</comments>
		
		<dc:creator><![CDATA[Drithi]]></dc:creator>
		<pubDate>Tue, 05 Jun 2012 08:49:00 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[c programs]]></category>
		<category><![CDATA[stack]]></category>
		<category><![CDATA[stack operations]]></category>
		<category><![CDATA[stack push]]></category>
		<category><![CDATA[stack pop]]></category>
		<category><![CDATA[data structures]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=3121</guid>

					<description><![CDATA[<p>Following program performs various stack operations,   #include #include #include #include #define max 20 int top=-1,s[max]; void push(int n) { if(top==max-1) { puts("stack is over flown"); return; } else { top=top+1; s[top]=n; } } void pop() { int del; if(top==-1) { puts("stack is underflown"); return; } else { del=s[top]; printf("\n poped element is %d",del); top=top-1;</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-which-performs-stack-operations/">C Program which performs stack operations</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Following program performs various stack operations,</p>
<pre lang="c" line="1"> 
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
#define max 20

int top=-1,s[max];
void push(int n)
{
    if(top==max-1)
    {
        puts("stack is over flown");
        return;
    }
    else
    {
        top=top+1;
        s[top]=n;
    }
}
void pop()
{
    int del;
    if(top==-1)
    {
        puts("stack is underflown");
        return;
    }
    else
    {
        del=s[top];
        printf("\n poped element is %d",del);
        top=top-1;
    }
}
void display()
{
    int i;
    if(top==-1)
        puts("stack is empty");
    else
    {
        for(i=top;i>=0;i--)
            printf("\t%d",s[i]);
    }
}
void main()
{
    int opt,n;
    do
    {
        printf("\n 1.push");
        printf("\n 2.pop");
        printf("\n 3.display");
        printf("\n 4.exit");
        printf("enter ur option");
        scanf("%d",&opt);
        switch(opt)
        {
        case1:printf("\n enter any element to push");
            scanf("%d",&n);
            break;
        case2:pop();
            break;
        case3:display();
            break;
        case4:exit(0);
            break;
        }
    }
    while(1);
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-which-performs-stack-operations/">C Program which performs stack operations</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/c-advanced/c-program-which-performs-stack-operations/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
