in Technology by
What is dangling pointer in C?

1 Answer

0 votes
by

Generally, daggling pointers arise when the referencing object is deleted or deallocated, without changing the value of the pointers. It creates the problem because the pointer is still pointing to the memory that is not available. When the user tries to dereference the daggling pointers than it shows the undefined behavior and can be the cause of the segmentation fault.

In simple words, we can say that dangling pointer is a pointer that not pointing a valid object of the appropriate type and it can be the cause of the undefined behavior.

Related questions

+1 vote
    What is a dangling pointer in C Porgamming?...
asked Nov 9, 2020 in Technology by JackTerrance
0 votes
    What is the explanation for the dangling pointer in C?...
asked Nov 8, 2020 in Technology by JackTerrance
0 votes
    What is a dangling pointer?...
asked Jan 17, 2021 in Technology by JackTerrance
0 votes
    What command is used for remove all stopped containers, unused networks, build caches, and dangling images? docker system kill ... kill -a docker system prune docker system rm -a...
asked Jun 22, 2021 in Technology by JackTerrance
0 votes
    What is Indirection and Increment/Decrement operators with a pointer in C?...
asked Jan 24, 2021 in Technology by JackTerrance
0 votes
    How can we do Pointer comparison in C?...
asked Jan 24, 2021 in Technology by JackTerrance
0 votes
    How is a Program increment a pointer in C?...
asked Jan 24, 2021 in Technology by JackTerrance
0 votes
    Which type of pointer is the most convenient way of storing the raw address in C programming?...
asked Jan 23, 2021 in Technology by JackTerrance
0 votes
    What is the use of a double pointer (pointer to pointer) in C?...
asked Jan 22, 2021 in Technology by JackTerrance
0 votes
    How to declare a pointer to a function in C?...
asked Jan 22, 2021 in Technology by JackTerrance
0 votes
    What is the advantage of a void pointer in C?...
asked Jan 22, 2021 in Technology by JackTerrance
0 votes
    What is the usage of the NULL pointer in C?...
asked Jan 21, 2021 in Technology by JackTerrance
0 votes
    What is the size of a void pointer in C?...
asked Jan 21, 2021 in Technology by JackTerrance
0 votes
    What is a near pointer in C?...
asked Jan 21, 2021 in Technology by JackTerrance
0 votes
    What is a far pointer in C?...
asked Jan 21, 2021 in Technology by JackTerrance
...