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
C. none
D. all
Answer» B. No
3.4k
0
Do you find this helpful?
26

View all MCQs in

CPP Programming

Discussion

No comments yet

Related MCQs