Do i require checking for null before delete p?, C/C++ Programming

Assignment Help:

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;

 


Related Discussions:- Do i require checking for null before delete p?

Constructor , What is constructor or ctor? need help

What is constructor or ctor? need help

Fibonacci series, draw the flow chart to print the fibonacci series upto n ...

draw the flow chart to print the fibonacci series upto n th terms

Illustrate the problems with multiple inheritance, Problems With Multiple I...

Problems With Multiple Inheritance The following example presents a problem with multiple inheritance. class Aclass  {   public :  void put()

GPA Calculator, I am having trouble declaring a variable and returning a va...

I am having trouble declaring a variable and returning a value from my function.

Decoding, how to decode a number from mobile keypad

how to decode a number from mobile keypad

Area under the curve, Write a program to find the area under the curve y = ...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd