C Linked List 12: Insert a new node at the beginning in a double linked list [C Programming]

Опубликовано: 22 Октябрь 2024
на канале: JLabs
1,151
34

Insert a new node at the beginning in a double linked list.

Expected Output :
Input the number of nodes : 3
Input data for node 1 : 2
Input data for node 2 : 5
Input data for node 3 : 8

Data entered in the list are :
node 1 : 2
node 2 : 5
node 3 : 8
Input data for the first node : 1

After insertion the new list is :
node 1 : 1
node 2 : 2
node 3 : 5
node 4 : 8

=================================================

   • C Programming - Linked List  

Website : http://www.jlabstech.com
Like us on Facebook :   / jlabstechnology  
Follow on Twitter :   / _jlabs_