Data Structures Lab Manual / Data Structures Double Linked List C Program

Program Name: Write a C Program for Double Linked List in Data Structures
Theory
Doubly linked list consists of a set of sequentially linked records called nodes. 
Each node contains three fields: two link fields (previous and next node) and one
data field. In Doubly linked list traversing can be done in both directions and 
displays the contents in the wholelist.
Program Code



Input and Output:

Choose 
1.Insert in begining
2.Insert at last
3.Insert at any random location
4.Delete from Beginning
5.Delete from last
6.Delete the node after the given data
7.Search Element
8. Display Elements
9.Exit
1

Enter Item value10

Node inserted

Choose 
1.Insert in begining
2.Insert at last
3.Insert at any random location
4.Delete from Beginning
5.Delete from last
6.Delete the node after the given data
7.Search Element
8. Display Elements
9.Exit
1

Enter Item value20

Node inserted

Choose 
1.Insert in begining
2.Insert at last
3.Insert at any random location
4.Delete from Beginning
5.Delete from last
6.Delete the node after the given data
7.Search Element
8. Display Elements
9.Exit
7

Enter item which you want to search?
2

Item not found

Choose 
1.Insert in begining
2.Insert at last
3.Insert at any random location
4.Delete from Beginning
5.Delete from last
6.Delete the node after the given data
7.Search Element
8. Display Elements
9.Exit
20
Enter valid choice
Choose 
1.Insert in begining
2.Insert at last
3.Insert at any random location
4.Delete from Beginning
5.Delete from last
6.Delete the node after the given data
7.Search Element
8. Display Elements
9.Exit
8

 Printing Double Linked List Node values
20
10

Choose 
1.Insert in begining
2.Insert at last
3.Insert at any random location
4.Delete from Beginning
5.Delete from last
6.Delete the node after the given data
7.Search Element
8. Display Elements
9.Exit



Home     Back