#include
typedef struct node{ char name[20]; struct node *link; }stud;
void creat(stud **head) //注意必须是指针的指针才能创建链表 { stud *p,*s; int i; *head=(stud *)malloc(sizeof(stud)); if(*head==NULL){ printf(\不能分配内存空间!\\n\ exit(0); } (*head)->name[0]='\\0'; (*head)->link=NULL; p=*head; for(i=0;i
int main() { int number; stud *head,*p; number=N; creat(&head); p=head; while(p){ printf(\ p=p->link; } return 0;
}