#include<stdio.h> #include<conio.h> #define SIZE 5
int front = – 1; int rear = – 1; int q[SIZE]; void insert( ); void del( ); void display( ); void main( )
{
int choice; clrscr( ); do
{
printf(“\t Menu”); printf(“\n 1. Insert”);
printf(“\n 2. Delete”); printf(“\n 3. Display “); printf(“\n 4. Exit”);
printf(“\n Enter Your Choice:”); scanf(“%d”, &choice); switch(choice)
{
case 1:
case 2:
case 3:
case 4:
}
insert( ); display( ); break;
del( ); display( ); break;
display( ); break;
printf(“End of Program… !!!!”); exit(0);
}while(choice != 4);} void insert( )
{
int no;
printf(“\n Enter No.:”);
scanf(“%d”, &no);
if(rear < SIZE – 1)
{
}
else
{
}}
void del( )
{
q[++rear]=no; if(front = = – 1)
front=0;// front=front+1;
printf(“\n Queue overflow”);
if(front = = – 1)
{
}
else
{
}
printf(“\n Queue Underflow”); return;
printf(“\n Deleted Item:–>%d\n”, q[front]);
if(front = = rear)
{ output
}
else
{
}}
void display( )
{
Front = – 1; Rear = – 1;
Front = front + 1;
int i;
if( front = = – 1)
{
printf(“\nQueue is empty… “); return;
}
for(i = front; i<=rear; i++)
printf(“\t%d”,q[i]);}
