Skip to main content

Posts

Showing posts from October, 2015

Single LindedList in C. Program to create, insert, delete, traverse in Single Linked List.

For creating the LinkedList program I have used Linux(ubuntu 12.04) machine. When I was in my college days, I would use the Tourbo C compiler which was easy to use in Windows Type the following command to install the build-essential which create our environment and C  compiler to build and run C programs. This will be enough for our purpose to create C programs. $ sudo apt−get install build−essential SinglyLinkedList.c ----------------------- #include <stdio.h> #include <stdlib.h> /* Linded List is having an element and a pointer which points to the same type of structure. I have type defined a NODE type and given alias as "node". */ typedef struct NODE { int info; struct NODE *next; }node; /* I have created a boolean type which returns 0, 1 and 2 which returns false, true and done respectively. This is basically for return type to be used in the program to return boolean values. */ typedef enum {false, true, done}boolean; /* Now crea...