Following is the function which are used to insert the element in the queue:
void insert()
{
int n;
if (rear == MAX - 1)
printf("Queue Overflow \n");
else
{
if (front == - 1)
front = 0;
printf("Enter the element in queue");
scanf("%d",&n);
rear = rear + 1;
queue[rear] = n;
}
}