- 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; }
1 Answer
0
what is your specific question?