void outlist (SLIST * h) SLIST * p; p=h->next; if (p==NULL) printf ("/nThe list is NULL ! /n"); else printf ("/nHead"); do printf ("->% d", p->data); p=p->next; while (p!=NULL); printf("->End/n");
main () SLIST * head; int x; int a[N]=11, 12, 15, 18, 19, 22, 25, 29; head=creatlist (a); printf ("/nThe list before inser- ting: /n"); outlist (head); printf("/nEnter a number : "); scanf ("% d", &x); fun (head, x); printf (" /nThe list after inser- ting: /n"); outlist (head);