Node *l, *r, *p; l = (pNode)malloc(sizeof(Node));//l一定要进行保留,相当于是链表的首地址 r = l; //printf("malloc%d:%p/n",0,r); int i = 0; for(i=0;i<9;i++){ p = (pNode)malloc(sizeof(Node)); p->next = NULL; r->next = p; //printf("malloc%d:%p/n",i+1,r->next); r = p; } p = l;//赋初值 printf("/n"); for(i=0;i<10;i++){ //printf("free%d:%p/n",i,p); free(p); p = p->next; }