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 type of question are asked in GE code writing test based on c++ data structures and pointers?

3984


What is #include iostream?

1256


What do you mean by function pointer?

1122


What is virtual function? Explain with an example

1102


What is general format for a prototype?

1043


What is oops in c++?

1068


What is a stack? How it can be implemented?

1169


Explain the benefits of proper inheritance.

1152


Why do we learn c++?

973


What is difference between class and function?

1097


What is the disadvantage of using a macro?

1127


What is setfill c++?

1159


Why is c++ not purely object oriented?

1013


Is c++ an integer?

1041


What are shallow and deep copy?

1121