Data Structures Lab Manual / Data Structures Queue C Program

Program Name: Write a C Program for Queue in Data Structures
Theory
A Queue is a linear structure (collection of items) which follows a First In First Out 
(FIFO) order in which the operations are performed. 
Program Code



Input:
Enter your choice : 
Queue 1.Insert Element 2.Delete Element 3.Display all Elements 4.Quit  
1
Enter a Element to Insert in the Queue : 9
Enter your choice : 
Queue 1.Insert Element 2.Delete Element 3.Display all Elements 4.Quit  
1
Enter a Element to Insert in the Queue : 6
Enter your choice : 
Queue 1.Insert Element 2.Delete Element 3.Display all Elements 4.Quit  
2
Element deleted from queue : 9
Enter your choice : 
Queue 1.Insert Element 2.Delete Element 3.Display all Elements 4.Quit  
3
Queue is : 
6 
Enter your choice : 
Queue 1.Insert Element 2.Delete Element 3.Display all Elements 4.Quit  
Output:
Enter your choice : 
Queue 1.Insert Element 2.Delete Element 3.Display all Elements 4.Quit  
1
Enter a Element to Insert in the Queue : 9
Enter your choice : 
Queue 1.Insert Element 2.Delete Element 3.Display all Elements 4.Quit  
1
Enter a Element to Insert in the Queue : 6
Enter your choice : 
Queue 1.Insert Element 2.Delete Element 3.Display all Elements 4.Quit  
2
Element deleted from queue : 9
Enter your choice : 
Queue 1.Insert Element 2.Delete Element 3.Display all Elements 4.Quit  
3
Queue is : 
6 
Enter your choice : 
Queue 1.Insert Element 2.Delete Element 3.Display all Elements 4.Quit  


Home     Back