Q:

null pointer vs dangling pointer

Is there a meaningful difference between a null pointer and a dangling pointer?  It seems like these are both terms used for pointers that don't point to anything.  Is the idea that a dangling pointer used to refer to something and now doesn't -- where a null pointer is just a pointer that does not refer to anything (regardless of what it pointed to in the past)?  

A:

Pointer terminology:

Dangling (or wild) pointer: a pointer that points somewhere, but not to a valid object. 
Null pointer: a pointer that points to a specially designated out-of-bounds location that programs will never legally store data in.   Special class of dangling pointer. 
Uninitialized pointer: a pointer that was never assigned to the address of something.   A type of dangling pointer. 
Stale pointer: a pointer that used to point to something, but the target has been deleted (either via delete operator, free, or gone out of scope).  A type of dangling pointer. 

Pointers that are dangling can be said to be pointing to Hyperspace or to Another Dimension, except the null pointer, which is generally referred to as pointing to Nothing. 

A:

A null pointer just means the pointer isn't pointing to anything, or in some languages means it is unknown what it is pointing at.   But because it is a null pointer, you know this, the code knows this, so no problem.   A dangling pointer is one that you think is pointing at something but in reality is no longer there, hence the pointer is actually inaccurate but doesn't know it.