#include #include #include #define N 20 typedef struct Person{ char Tel[N]; char Name[N]; char Address[2*N]; struct Person *next; }Person,*Linklist; //输入函数 void InPut(Linklist p) { printf("\n 请输入通讯者姓名:\n"); scanf("%s",p->Name); printf("\n 请输入通讯者联系电话:\n"); scanf("%s",p->Tel); printf("\n 请输入通讯者地址:\n"); scanf("%s",p->Address); } //输出单个联系人的信息 void PutNode(Linklist p) { printf("\n 通讯者姓名:\n%s",p->Name); printf("\n 通讯者联系电话:\n%s",p->Tel); printf("\n 通讯者地址:\n%s\n\n",p->Address); } //回收内存函数 void Release(Linklist L) { Linklist z,p; p=L; while(p
=NULL) { z=p->next; free(p); p=z; } } //建立链表的函数 Linklist CreatList() { int tem1; Linklist s,p,L; printf("\n 输入通讯者信息:\n 输入非零整数开始;或者输入'0'退出:\n"); scanf("%d",&tem1); L=(Linklist)malloc(sizeof(Person)); L->next=NULL; s=L; while(tem1
=0){ p=(Linklist)mall