int main()
{
int *p,*q;
p=(int *)malloc(sizeof(int));
*p=5;
free(p);
}
When I examine the memory address allocated to p
after the execution of the free(p)
statement, I observe that the memory content is 0. Is this the right behavior because I have read that free
does not initialize the memory to 0?