# include <stdio.h> 那个高手来具体讲下这个程序的啊。
# include <malloc.h>
# define LEN sizeof(struct student) LEN后面的是什么意思。
struct student
{ int data;
① struct student *next ;
};
int num=1;
struct student *creat()
{ struct student *head,*p1,*p2;
head=p1=p2=(struct student *)malloc(LEN);这句是什么意思。
scanf("%d",&p1->data);
while(num<4)
{ p1=(struct student *)malloc(LEN);
scanf("%d",&p1->data);
② p2->next=p1 ;
p2=p1;
num++;
}
p2->next=NULL;
return(head);
}
main()
{ struct student *head,*p;
head=creat();
p=head;
if(head!=NULL)
do{ printf("%d ", p->data);
③ p=p->next ;
}while(p!=NULL);
}