How do you make a head insert function with this type of linkedlist?
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
typedef struct node
{
int data;
struct node *next;
} node;
// A neat struct to hold the ‘head’ and ‘tail’ pointer of alinked list. This
// provides a really elegant mechanism for functions to be ableto modify both
// the head and tail of a linked list without need for returnvalues or double
// pointer parameters.
typedef struct LinkedList
{
node *head;
node *tail;
} LinkedList;
// Create a linked list. Initialize those pointers to NULL withsome calloc()
// fanciness.
LinkedList *create_list(void)
{
LinkedList *new_list = malloc(sizeof(LinkedList));
new_list->head = NULL;
new_list->tail = NULL;
return new_list;
}
// Create a new node. Properly initialize all fields.
node *create_node(int data)
{
node
PayPal Gateway not configured
PayPal Gateway not configured