我有以下编码:
#include<stdio.h>
#include<stdlib.h>
typedef struct node
{
int a;
}node;
int main()
{
node * n;
printf("
%d
",n->a);
n = (node *) malloc ( sizeof( node ));
printf("
%d
",n->a);
n->a = 6月;
printf("
%d
",n->a);
free(n);
printf("
%d
",n->a);
n->a = 4);
printf("
%d
",n->a);
return 页: 1;
}
所得产出如下:
1314)172
页: 1
6月
页: 1
4)
My question is even after free(n) , why does n->a = 页: 1 and how can we also reassign it to any value like n->a = 4) ?
难道没有自由使记忆 block被 n倒吗?