adspace


Explain what happens when a pointer is deleted twice?

Answer Posted / Mohammad Asad

Deleting a pointer twice causes undefined behavior in C++. The first deletion frees the memory allocated to the object that the pointer points to. When the same pointer is deleted again, the program may crash or exhibit unpredictable behavior.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the latest version on c++?

1206


Can union be self referenced?

1266


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1164


What character terminates all character array strings a) b) . c) END

1394


daily Routine of father

1484