Data Structure Prac. No. 5 Write A Program To Insert, Delete, Display The Elements of A Queue
This program implements a queue using an array. It allows the user to insert elements into the queue, delete elements from the queue, and display all elements of the queue. The functions pq() inserts elements, nq() deletes elements, and display() prints all elements currently in the queue. The main() function uses a do-while loop to repeatedly call these functions based on user input until the user chooses to exit.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
50%(2)50% found this document useful (2 votes)
4K views
Data Structure Prac. No. 5 Write A Program To Insert, Delete, Display The Elements of A Queue
This program implements a queue using an array. It allows the user to insert elements into the queue, delete elements from the queue, and display all elements of the queue. The functions pq() inserts elements, nq() deletes elements, and display() prints all elements currently in the queue. The main() function uses a do-while loop to repeatedly call these functions based on user input until the user chooses to exit.