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 use of default constructor?

1035


what are the types of Member Functions?

1079


How is static data member similar to a global variable?

1047


Which operator cannot overload?

988


program explaining feautures of c++

2389


What is a vector c++?

1097


Explain class invariant.

987


Differentiate between a copy constructor and an overloaded assignment operator.

1015


Should I learn c++ c?

999


Is c++ vector dynamic?

1011


What is the full name of logo?

1058


What are shallow and deep copy?

1038


How do you differentiate between overloading the prefix and postfix increments?

1039


Explain public, protected, private in c++?

957


Can recursive program be written in C++?

1181