/*WAP to display from double linked list*/ #include<stdio.h> #include<conio.h> #include<stdlib.h> struct node { int data; struct node *llink; struct node *rlink; }; typedef struct node node; void display(node *); void main() { node *header=NULL; int n; clrscr(); display(header); getch(); } void display(node *temphead) { while(temphead!=NULL) { printf("\n%d",temphead->data); temphead=temphead->rlink; } }
No comments:
Post a Comment