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

why all c++ program must have default constructor?

Answer Posted / rahin99435

The purpose of constructor is to initialize the class members and allocate necessary resources for them; at runtime.So by default C++ compiler is provided with a default constructor which performs the same job at runtime while the object is created.
There is provision of defining more than one constructor by changing the signatures to get objects of different kind.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the full form of stl in c++?

1238


When should we use multiple inheritance?

1096


What will happen if a pointer is deleted twice?

1248


write a program that withdrawals,deposits,balance check,shows mini statement. (using functions,pointers and arrays)

2470


Do we have to use initialization list in spite of the assignment in constructors?

1050


What is c++ manipulator?

1027


If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?

1099


Explain how we implement exception handling in c++?

1106


What does scope resolution operator do?

1163


What you know about structures in C++?

1139


What is a null object in c++?

1308


What is the best way to take screenshots of a window with c++ in windows?

1094


What are c++ tokens?

1114


What do you mean by public protected and private in c++?

1112


Should I learn c++ c?

1101