|
DEREFERENCING NULL
As we know NULL pointer is actually a pointer which points to nowhere and hence we can not dereference to the NULL pointer. It is a run time ERROR to point to the NULL pointer.
Int* x=NULL;
*x=3; DEREFERENCING NULL ERROR
After execution of statement 1, in the memory map x can be described as follow:

Now if we try to execute statement2, which actually is trying to assign value to the pointee of the ponter x. But as we know, the above declared pointer has no pointee, hence now we can recognize an ERROR in the above set of statements and the ERROR is called DEREFERENCING NULL
|