printf("\ the value deleted from queue % ",val)breakcase printf("\ the contents of queue are \ ")display_queuea()breakcase printf("\ the contents of queue are \ ")display_queueb()break}while(option!= )getch()output *******menu****** insert in queue insert in queue delete from queue delete from queue display queue display queue exit enter your option enter the value to be inserted in queue enter the value to be inserted in queue enter your option the contents of queue are enter your option applications of queues queues are widely used as waiting lists for single shared resource like printerdiskcpu queues are used to transfer data asynchronously (data not necessarily received at same rate as sentbetween two processes (io buffers) pipesfile iosockets queues are used as buffers on mp players and portable cd playersipod playlist queues are used in playlist for jukebox to add songs to the endplay from the front of the list queues are used in operating system for handling interrupts when programming real-time system that can be interruptedfor exampleby mouse clickit is necessary to process the interrupts immediatelybefore proceeding with the current job if the interrupts have to be handled in the order of arrivalthen fifo queue is the appropriate data structure josephus problem let us see how queues can be used for finding solution to the josephus problem in josephus problemn people stand in circle waiting to be executed the counting starts at some point in the circle and proceeds in specific direction around the circle in each stepa certain number of people are skipped and the next person is executed (or eliminatedthe elimination of people makes the circle smaller and smaller at the last steponly one person remains who is declared the 'winnerthereforeif there are number of people and number which indicates that - people are skipped and -th person in the circle is eliminatedthen the problem is to choose position in the initial circle so that the given person becomes the winner for exampleif there are (npeople and every second (kperson is eliminatedthen first the person at position is eliminated followed by the person at position followed by person at position and finally the person at position is eliminated thereforethe person at position becomes the winner