Vidyalelo
C++ Programming · Q61

Object Oriented Programming in C++

Programming · C++ Programming · question 61

Q61

What happens if the following C++ statement is compiled and executed? int *ptr = NULL; delete ptr;

A.
The program compiled successfully but throws an error during run-time
B.
The program gives a compile-time error
C.
The program is not semantically correct
D.
The program is compiled and executed successfully
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board