1. Computer Science Engineering (CSE)
  2. CPP Programming
  3. Is it fine to call delete twice for a po...
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
View all MCQs in:   CPP Programming

Discussion