Q79
What happens if a pointer is deleted twice in a program as shown in the following C++ statements? int *ptr = new int; delete ptr; delete ptr;
A.
Undefined behaviour
AnswerB.
Syntactically incorrect
C.
Semantically incorrect
D.
The program runs perfectly
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board