关于free()函数
free(p)函数的意思不是释放掉p所指向的空间,使得该空间被系统收回么?那为什么下边代码中p与q指向的并不是NULL?int *p,*q;
p=(int *)malloc(sizeof(int));
*p=10;
q=p;
printf("%d\n",*p);
free(p);
printf("%d\n",*q);
free(p);
if(q==p)
printf("true\n");
if(p==NULL)
printf("true\n");
2015-07-07 14:07
2015-07-07 14:15
2015-07-07 14:26
2015-07-07 14:59
2015-07-07 16:02
2015-07-07 16:36
2015-07-14 15:45