Skip to main content

Posts

Showing posts from May, 2020
Doubly Link List using C #include<stdio.h> struct node{     struct node *next, *prev;     int data; }*head = NULL; /*displaying nodes*/ void display(){     struct node *ptr;     if(head == NULL){         printf("\nList is empty");     }else{         printf("\nThe nodes are: ");         ptr = head;         while(ptr != NULL){             printf("%d\t",ptr->data);             ptr = ptr->next;         }     } } /*inserted new node at beginning*/ void ins_beg(int x){     struct node *tmp;     tmp = (struct node*)malloc(sizeof(struct node));   ...