If I use malloc()
to allocate memory and do not use free()
to de-allocate the
the memory. why cannot that memory be accessed by other program by just over writing the previous content
void main()
{
int *a; //here a is holding a junk value
MALLOC(a,1,int);
*a=100; //a is holding 100
MALLOC(a,1,int);
*a=200; //a is holding 200
/* so memory location where the value 100 is stored is inaccessible
cannot be reused */
//why can't we just over write that memory space when used next time
}