帮忙解决C语言
#include "stdlib.h"
#include "stdio.h"
struct node
{int a;
struct node *next;
};
void xx(top)
struct node *top;
{top=(struct node *)malloc(sizeof(struct node));
top->a=4;
top->next=NULL;
return;
}
main()
{struct node *top=NULL;
xx(top);
printf("%d\n",top->a);
}
为什么输出为0
我想输出为4 怎么编?在线等