Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Difference between delete and delete[]?

Answer Posted / vikas

If p is pointer to an array and is allocated memory on
heap, then delete p would call the destructor of the first
element but will free up the whole block. More info at:

http://www.cppquestions.com/viewtopic.php?f=27&t=13

Is This Answer Correct ?    14 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by stack unwinding in c++?

1287


Is c++ an oop?

1193


Describe public access specifiers?

1160


Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?

1121


Why pointer is used in c++?

1227


Why is "using namespace std;" considered bad practice?

1143


Comment on c++ standard exceptions?

1127


What is the difference between object-oriented programming and procedural programming?

1300


What is meant by entry controlled loop?

1181


What are virtual constructors/destructors?

1074


Tell me an example where stacks are useful?

1097


an operation between an integer and real always yeilds a) integer result b) real result c) float result

1213


What is time h in c++?

1182


What is the v-ptr?

1214


What is the array and initializing arrays in c++?

1073