代码如下:#include <stdio.h>#include <stdlib.h>struct test {int a;struct test *next;};int main(){struct test test0={10};struct test *test1 = (struct test *)malloc(sizeof(struct test));test1->a=20;test1->next = &test0;free(test1);printf("%d %d",test1->a,(*test1->next).a); }输出test1->a为0 ,(*test1->next).a为10
- 2 回答
- 0 关注
- 146 浏览
添加回答
举报
0/150
提交
取消