I\'m confused why the following C++ code can compile. Why does a call to delete the method of 0 not produce any error?!
int *arr = NULL; // or if I use 0
The C++ language guarantees that delete p will do nothing if p is equal to NULL.
For more info, check out Section 16.8,9 here: