//Main Function int main() { nodeptr list; list= NULL; insertatfirst(&list, 6); insertatfirst(&list, 5); insertatfirst(&list, 4); printf("The linked list is:\n"); displaylist(list); printf("The deleted item is:\n %d", deletefromfront(&list)); printf("\nThe linked list is:\n"); displaylist(list); }
int main() { nodeptr p; p=NULL; insertatfirst(&p,5); insertatfirst(&p,6); insertatfirst(&p,7); displaylist(p); printf("deleted=%d\n",deletefromfront(&p)); printf("deleted=%d\n",deletefromfront(&p)); printf("deleted=%d\n",deletefromfront(&p)); printf("deleted=%d\n",deletefromfront(&p)); displaylist(p); }
int main() { nodeptr list; list = NULL; insertatfirst(&list,5); insertatfirst(&list,6); insertatfirst(&list,7); insertatfirst(&list,8); insertatfirst(&list,9); insertatfirst(&list,10); displaylist(list); printf("deleted=%d\n",deletefromfront(&list)); printf("deleted=%d\n",deletefromfront(&list)); displaylist(list); }