Skip to content

The C code implements a queue data structure using a singly linked list. It allows users to enqueue elements to the rear of the queue, dequeue elements from the front, and display the queue. Error handling for queue overflow and underflow is included

License

Notifications You must be signed in to change notification settings

sanjanatg/Queue-implemented-using-singly-Linked-list-in-C.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Queue-Implementation-using-Singly-Linked-List


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.

About

The C code implements a queue data structure using a singly linked list. It allows users to enqueue elements to the rear of the queue, dequeue elements from the front, and display the queue. Error handling for queue overflow and underflow is included

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages