<?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>queue overflow | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/queue-overflow/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>
	</channel>
</rss>
