Queue Implementation using Singly Linked List
This C program implements a queue data structure using a singly linked list. Queues follow the First-In-First-Out (FIFO) principle,= where the first element added is the first to be removed.
Key Features:
Insertion (Enqueue): Adds an element to the rear of the queue.
Deletion (Dequeue): Removes the front element from the queue.
Display: Prints the elements of the queue in the order from front to rear.
Queue Overflow/Underflow Handling: Prevents the queue from exceeding its maximum size or becoming empty.
Input:
The program will prompt you to enter the maximum size of the queue.
You'll then be presented with a menu to choose from the following operations:
1: Enqueue an element to the queue
2: Dequeue an element from the queue
3: Display the queue
Output:
The program will display appropriate messages for queue overflow, underflow, and successful operations.
It will also print the elements of the queue when you choose to display them.