代碼如下:#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 關注
- 191 瀏覽
添加回答
舉報
0/150
提交
取消