Pointers
The pointer containing a NULL is your friend. It does not deliver you from the evil clutches of the segmentation fault or core-dump monsters. If you dereference it, the chances are very, very good that you will be delivered to that particular hell.
NULL is a special value that is used to identify an invalid pointer. The standards do not dictate that it is the value, zero, though it often is. They do require that a pointer with the value, zero, behave as if it contains the value, NULL.
What in the world is a pointer good for if you can’t dereference it? It tells you unequivocally that it is no cottonpickin’ good! If you know of another value which will never be a valid memory address wherever your program might roam, or one that is as easily remembered, feel free to use it as a reminder. Bear in mind, though, that those who have gone before tend to rely on the NULL value. The writers of "malloc" will, these days, accept and ignore a NULL value should you try to free memory with it. Things are likely to backfire if you use, say, 0xcccccc, however effective that value might be as a memory-jogger.
When one has borrowed memory from the heap, and returned it, setting the pointer that held its address to NULL will let everyone (who bothers to check) know that it is no longer useful. It is spent and currently in retirement. If one forgets and attempts to free it again, it's no big deal. Initializing a pointer to NULL when it is declared, if one doesn’t plan to use it immediately, is a good idea for the same reason. Its value will let you (or your code-sharing cohorts) know that it isn't useful; don’t dereference it.
One isn’t required to use a pointer variable as a pointer. One may very well just store an address there and pass it around. If it doesn’t get dereferenced, you’re walking in tall cotton. Unfortunately, that approach discards much of the utility of the pointer as a tool. It is better to conquer it, use it, and move on.
Sneaky Pointers