Linked Lists Using C Programming Language
What is a linked list? Google says, ' an ordered set of data elements, each containing a link to its successor '. Yes, that's true. I assume that you know about arrays and you have an experience with arrays using C programming language. In C, we have to give the size or assign the values to the array when we declare it as shown below. Above example, We ought to know the number of data elements that we are going to insert into the array. When we declare an array it reserves consecutive memory locations from the RAM. It is a memory wasting (The size is static ) . With linked lists , we can allocate memory location from the RAM dynamically when needed. Here we go... What are the libraries that we need? <stdio.h> <stdlib.h> which includes functions involving memory allocation, process control, conversions and others. Creating the node structure Here we have created a data structure for the node ( 'node' is the name of the dat...