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.
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