请大家帮忙看看,谢谢!
#include<stdio.h>#include<string.h>
#define LA 4
#define LB 5
struct student
{
long num;
char name[8];
struct student *next;
}a[LA],b[LB];
int main(void)
{
struct student a[LA]={{1,"wang"},{2,"li"},{3,"zhang"},{4,"wei"}};
struct student b[LB]={{3,"zhang"},{4,"ma"},{5,"chen"},{6,"guo"},{10,"lui"}};
struct student *p,*p1,*p2,*pa1,*pa2,*pb1,*pb2,*heada,*headb;
heada=p1=a;
headb=p2=b;
printf("list a\n");
while(p1!=NULL)
{
printf("%ld %s\n",p1->num,p1->name);
p1=p1->next;
}
printf("list b\n");
while(p2!=NULL)
{
printf("%ld %s\n",p2->num,p2->name);
p2=p2->next;
}
}
我想要它完全显示出来,大家运行一下就知道我的问题了
谢谢!