创建链表中的一部分,求解答!
程序代码:LNode *Creatlist(LNode **head,int n)
{
int i;
LNode *current,*l;
current=*head;
for(i=0;i<n;i++)
{
l=(LNode *)malloc(sizeof(Linklist));
if(!l)
exit(-1);
scanf("%s",l->stu.num);
scanf("%s",l->stu.name);
scanf("%d",&l->stu.age);
scanf("%c",&l->stu.sex);
scanf("%4d%2d%2d",&l->stu.birth.year,&l->stu.birth.month,&l->stu.birth.day);
scanf("%s",l->stu.addr);
scanf("%s",l->stu.phone);
scanf("%s",l->stu.email);
if(current->next==NULL)
{current->next=l;l->next=NULL;}
else{
l->next=current->next;
current->next=l;
}
}
return *head;
}我设置的n=1,为什么在输入的时候只能输入完scanf("%s",l->stu.addr);之后便结束输入直接跳转到菜单函数了

