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
What is the use of default constructor?
what are the types of Member Functions?
How is static data member similar to a global variable?
Which operator cannot overload?
program explaining feautures of c++
What is a vector c++?
Explain class invariant.
Differentiate between a copy constructor and an overloaded assignment operator.
Should I learn c++ c?
Is c++ vector dynamic?
What is the full name of logo?
What are shallow and deep copy?
How do you differentiate between overloading the prefix and postfix increments?
Explain public, protected, private in c++?
Can recursive program be written in C++?