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