Q:

What is a dangling pointer in c++?

0

What is a dangling pointer in c++?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

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

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Interview Questions For Experienced

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
STL Containers – What are the types of STL conta... >>
<< Why static functions cannot access non-static vari...