Creation and Insertion in Doubly Linked List
Creation and Insertion in Doubly Linked List
#include <stdio.h>
#include <stdlib.h>
struct node{
int data;
};
if (*headPointer == NULL)
*headPointer = node;
return;
tempNode = *headPointer;
int sizeIndex = 0;
tempNode = *headPointer;
sizeIndex++;
printf("out of bounds");
return;
}
tempNode = *headPointer;
if (i == index - 1)
if (i == index)
return;
tempNode = *headPointer;
while (tempNode -> nextAddr != NULL)
int main() {
create(&head , 10);
create(&head , 20);
create(&head , 50);
create(&head , 30);
insert(&head , 3 , 100);
printLinkList(&head);
return 0;