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

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;

 

Posted Date: 3/19/2013 8:40:07 AM | Location : United States







Related Discussions:- Do i require checking for null before delete p?, Assignment Help, Ask Question on Do i require checking for null before delete p?, Get Answer, Expert's Help, Do i require checking for null before delete p? Discussions

Write discussion on Do i require checking for null before delete p?
Your posts are moderated
Related Questions
Project Description: Project is related indexing data related some data structure. I need to share all information related project later if i contact any body Skills required

I need help to understand and do this assignment ********************************************************* You are to insert the missing code in the C program given for combinatio

Question A bank normally updates it's clients accounts at the end of each month.Of the two types of bank accounts:savings and checking, a client must maintain a minimum balance


C program to remove vowels in sentence : void main() {                 char  str[100];                 int n;                 printf("enter string\n");

write a function that take as parameters an array of integer and its size and return the sum of its value

Want a scraping program created Project Description: We need to hire a professional developer to scrape the site for information such as *product title *Product Price

Virtual Webcam effects - Setup and Source code with Nice User Interface Project Description: I want a similar webcam effects application which can apply effects to webcam fee

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

how to decode a number from mobile keypad