Difference between null pointer and dangling pointer
Answers
Answered by
2
Hi, here the answer.:-
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. Dangling (or wild) pointer: a pointer that points somewhere, but not to a valid object.
May it help...
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. Dangling (or wild) pointer: a pointer that points somewhere, but not to a valid object.
May it help...
Answered by
0
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.
Similar questions