A pointer pointing to a dereferenced memory location is called dangling pointer.
i.e. pointer pointing to the memory location which is deleted.
-There are three different ways where a pointer can act as a dangling pointer.
-De-allocation of memory When the local variable is not static When the variable goes out of scopeRead More →