Q.

Is it fine to call delete twice for a pointer?
#include<iostream> using namespace std;
int main()
{
int *ptr = new int; delete ptr;
delete ptr; return 0;
}

A. yes
B. no
Answer» B. no
1.6k
0
Do you find this helpful?
9

Discussion

No comments yet

Related MCQs