Singly Linked List Insertion at beginning in C

Insertion in singly linked list at the beginning

C Program for insertion at the beginning of the Singly Linked List. A Singly linked list is made up of many nodes which are connected. Every node is mainly divided into two parts, one part holds the data and the other part is the link that connects to the next node

Insertion at beginning in singly linked list using C

Singly Linked List allow insertion at the following places:-

  • Insertion at the start of the singly Linked List
  • Insertion at the end of the singly linked list.
  • Insertion at the nth node of the singly linked list.
Insertion at beginning

Singly Linked List Definition

struct Node
{
  int Data;
  Struct Node *next;
};

C Program for Insertion at the Beginning of the Singly Linked List:-