data structures using array representation of queues queues can be easily represented using linear arrays as stated earlierevery queue has front and rear variables that point to the position from where deletions and insertions can be donerespectively the array representation of queue is shown in fig operations on queues in fig front and rear suppose we figure queue want to add another element with value then rear would be incremented by and the value would be stored at the position pointed by rear the queue after addition would be as shown in figure queue after insertion of new element fig herefront and rear every time new element has to be addedwe repeat the same procedure if we want to delete an element from the figure queue after deletion of an element queuethen the value of front will be incremented deletions are done from only this end of the queue the queue after deletion will be as shown in fig herefront and rear howeverbefore inserting an element in queuewe must check for overflow conditions an overflow will occur when step if rear max- write overflow we try to insert an element into queue that is already full goto step when rear max where max is the size of the queuewe [end of ifhave an overflow condition note that we have written max step if front - and rear - because the index starts from set front rear else similarlybefore deleting an element from queuewe set rear rear must check for underflow conditions an underflow condition [end of ifoccurs when we try to delete an element from queue that step set queue[rearnum is already empty if front - and rear - it means there step exit is no element in the queue let us now look at figs and which show the algorithms to insert and delete an element figure algorithm to insert an element in from queue queue figure shows the algorithm to insert an element in queue in step we first check for the overflow condition in step if front - or front rear step we check if the queue is empty in case the queue is write underflow emptythen both front and rear are set to zeroso that the else set val queue[frontnew value can be stored at the th location otherwiseif the set front front queue already has some valuesthen rear is incremented so [end of ifthat it points to the next location in the array in step the step exit value is stored in the queue at the location pointed by rear figure shows the algorithm to delete an element from figure algorithm to delete an element from queue in step we check for underflow condition an queue underflow occurs if front - or front rear howeverif queue has some valuesthen front is incremented so that it now points to the next value in the queue programming example write program to implement linear queue ##include #include