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

What is the difference between a constructor and a destructor in C++?

Answer Posted / nashiinformaticssolutions

While a destructor is used to remove class objects, a constructor aids in initializing them. Both are invoked automatically: the constructor allocates memory instantly upon creating a new object, and the destructor deals with memory when destroying an existing one.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the type of 'this' pointer?

982


What is the difference between a definition and a declaration?

1019


Is atoi safe?

1019


Explain about vectors in c ++?

978


Write a program to find the Fibonacci series recursively.

1041


How do you find out if a linked-list has an end?

1078


What is the purpose of ios::basefield in the following statement?

1211


Why should you learn c++?

978


Can a built-in function be recursive?

984


Difference between strdup and strcpy?

1150


When does a name clash occur in c++?

1122


Describe Trees using C++ with an example.

1104


Why is c++ not purely object oriented?

973


What are arrays c++?

1066


what is VOID?

1021