Program performing operations on linklist C

The below program is not full fledged, it is just sufficient to understand how linked list operations can be implemented. It can be made more sophisticated if required.

We can create a complete program with the help of following code snippet :

struct emp {
int e_no;
struct emp *next;
typedef struct emp node;
main ( )
node *start;
node* create (node *pt);
void display (node *pt);
node* insert (node *pt);
node* locate (node *pt, int target);
node* delete (node *pt);
printf (“\nCreate a link list….”);
start = create (start);
display (start);
printf (“\nINSERT a node…”);
start = insert (start);
display (start);
printf (“\nDELETE a node…”);
start = delete (start);
display (start);
printf (“\nTHANK you !”);

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

C Topics