- 2

about the linked list//

struct node { int date; struct node *next; }; typedef struct node linknode; typedef linknode *linklist; linklist creatlink() { linklist head,tail,q; int x; head=tail=NULL; printf("èŻ·èŸ“ć…„æ•Žæ•°ćșćˆ—(仄ç©șæ Œćˆ†éš”ïŒŒä»„0䜜äžș结束):\n"); scanf("%d",&x); while(x!=0) { q=(linklist)malloc(sizeof (linknode)); q->date=x; if(head==NULL) head=tail=q; else { tail->next=q; tail=q; } scanf("%d",&x); } if(tail!=NULL) tail=NULL;//can i change the tail->next=NULL to tail=NULL return head; }

22nd Nov 2017, 12:17 AM
juary
1 Answer
0
what is your specific question?
2nd Dec 2017, 7:07 AM
Daniel
Daniel - avatar