// void insert_start(struct node *head, int data)
// {
// struct node *ptr = (struct node *)malloc(sizeof(struct node));
// ptr->next_ptr = head;
// ptr->data = data;
// head=ptr;
// }
The above function does not work while the one below works
struct node *insert_start(struct node *head, int data)
{
struct node *ptr = (struct node *)malloc(sizeof(struct node));
ptr->next_ptr = head;
ptr->data = data;
return ptr;
}

