Click on any exercise below to see the source code, program output and explanation of the code.  Programs in this section make use of linked list. A linked list is a collection of linearly connected structures. Each node in a linked list must have at least a pointer field which points to the next node of the list.

Available Exercises

Exercise 5.1. Write a program to read integers, store them in a linked list, display the content of list, reverse the list, display the reversed list, deletes the list and exits.

Exercise 5.2. Write a program to sort a linked list of integers.

Exercise 5.3. Write a program which given a pointer to a linked list, returns the number of nodes in the list.

Exercise 5.4. Write a program to perform sequential search on a linked list.

Exercise 5.5. Write a C program that generates 10 random numbers, store them in a linked list, display the content of the list and search for an item on the list using the binary search algorithm. Once the search is done, delete the list.