Following is the function that are used to insert the element in circular queue
int insert()
{
int item;
if(front==0 && rear==MAX-1) || (front==rear+1)
{
printf("Queue is overflow\n");
return 0;
}
if(front==-1)
{
front=0;
rear=0;
}
else
{
if(rear==MAX-1)
rear=0;
else
rear=rear+1
}
printf("Enter the element for insertion\n");
scanf("%d",&item);
circular_queue[rear]=item;
}