3. A linked list is a sequence of data structures, which are connected via links. Write a complete C program to perform the following on a Circular Doubly Linked List (CDLL).
a. Get a number n (1-9) from user and create CDLL with n nodes, which contains the numbers (1, 2, .. n) as the data in the nodes.
b. Display the elements of CDLL.
c. Insert another node (data = 0) as the head of CDLL. Display the elements of CDLL.
d. Convert the CDLL into a DLL.
e. Remove the second node (head->next) from the DLL.
f. Display the elements of DLL in reverse order.
Comments
Leave a comment