#include<stdio.h>
#include<malloc.h>
int i;
struct xx
{
int xhao;
struct xx *dd;
};
struct xx *a,*b,*c;
int main()
{
a=b=c=(struct xx *)malloc(sizeof(struct xx));
c->dd=a;
for(i=0;i<5;i++)
{
printf("输入");
scanf("%d",&a->xhao);
b->dd=0;
a->dd=b;
a=b;
}
a=c->dd;
for(i=0;i<5;i++)
{
printf("%d\n",a->xhao);
a=a->dd;
}
return 0;
}
链表输出都一样是哪里出了问题
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-