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 / sunita shukla

Delete p deallocate memory pointed to by p and delete []p deallocate array. But delete p will delete only p[0]. Other array's Size-1 entries will not be deleted and this memory will leak.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain static and dynamic memory allocation with an example each.

1042


Why is main an int?

931


What is null pointer and void pointer and what is their use?

1034


Can constructor be private in c++?

979


Explain the advantages of using friend classes.

1089


Will c++ be replaced?

995


Is rust better than c++?

1058


What is an adaptor class in c++?

1090


What is the use of dot in c++?

1027


Define the process of handling in case of destructor failure?

993


Who made c++?

1015


Which is the best c++ compiler?

991


What is doubly linked list in c++?

1028


Which is not a valid keyword a) public b) protected c) guarded

1192


How can you specify a class in C++?

1223