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...

How do you allocate and deallocate memory in C++?

Answer Posted / hrpynux@gmail.com

Use the malloc() function to allocate memory in designated blocks and the new function to create a new function. To reallocate memory, the realloc() function is used. When finished, always include a free() function in order to free up the memory. If you used new(), use delete() to free up the memory.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you quickly find the number of elements stored in a static array?

1094


What is the use of "new" operator?

1131


What do you mean by overhead in c++?

1091


Explain what data encapsulation is in c++?

1098


How do we balance an AVL Tree in C++?

1128


How do you flush std cout?

1092


What are the restrictions apply to constructors and destructors?

1080


Explain class invariant.

1058


What is the difference between public, private, and protected access?

1067


Explain the extern storage classes in c++.

1050


What are the uses of static class data?

1185


What are associate containers?

1023


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

1233


Write a program to find the Fibonacci series recursively.

1073


What is the default access level?

1067