no its not requiredthe c language guarantees that


No. it's not required

The C++ language guarantees that delete p will do nothing if p is equivalent to NULL. As you might get the test backwards, and as most testing methodologies force you for performs test explicitly every branch point, you should not put in the redundant if test.

Wrong:                    

if (p != NULL)

delete p; Right: delete p;

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: no its not requiredthe c language guarantees that
Reference No:- TGS0217523

Expected delivery within 24 Hours