data structures using delete operation the delete operation is used to delete the element that is first inserted in queuei the element whose address is stored in front howeverbefore deleting the valuewe must first check if front=null because if this is the casethen the queue is empty and no more deletions can be done if an attempt is made to delete value from queue that is already emptyan underflow front rear message is printed consider the queue shown figure linked queue in fig to delete an elementwe first check if rear front front=null if the condition is falsethen we figure linked queue after deletion of an element delete the first node pointed by front the front will now point to the second element of the linked queue thusthe updated queue becomes as shown in step if front null write "underflowfig go to step figure shows the algorithm to delete an element from [end of ifa linked queue in step we first check for the underflow step set ptr front step set front front -next condition if the condition is truethen an appropriate message step free ptr is displayedotherwise in step we use pointer ptr that step end points to front in step front is made to point to the next node in sequence in step the memory occupied by ptr is figure algorithm to delete an element given back to the free pool from linked queue programming example write program to implement linked queue #include #include #include struct node int datastruct node *next}struct queue struct node *frontstruct node *rear}struct queue *qvoid create_queue(struct queue *)struct queue *insert(struct queue *,int)struct queue *delete_element(struct queue *)struct queue *display(struct queue *)int peek(struct queue *)int main(int valoptioncreate_queue( )clrscr()do printf("\ *****main menu*****")printf("\ insert")printf("\ delete")