Recolección de basura y referencia colgante

int x= 1000;   //creates a new 
memory block
int* p = x;   // *p is the pointer to address block 1000(mem location) 
int *p = 20;
printf("%d",*p); //This pointer prints 20 
delete p; 
printf("%d",*p); // This would throw an error, because now p is 
                 // inaccessible or dangling. *p is a dangling pointer.
Puzzled Panther