Concepts of pointers

please describe what is a null pointer and what is dangling pointer?

@deck123
NULL pointer is a pointer which do not point to any location.

Lets say a pointer is pointing to memory location, then the memory gets freed, now that memory location in invalid. then you call the pointer pointing to that memory location a dangling pointer.

ok, suppose I declare a pointer and do not define it so this is what is called null pointer!?

No that would be wild pointer,
if you assign it to NULL, then it would be null pointer.