Correct option is D
In C++, constructors have special properties that define how objects are initialized. Constructors do not have return types, and they can be overloaded to allow different ways of object creation.
1.
A constructor can be overloaded.
· This is
true. Overloading allows defining multiple constructors with different parameters, which can be helpful in providing various ways to initialize an object.
2.
A constructor does not have a return type.
· This is
true. Unlike other functions, constructors do not have a return type, not even void.
Information Booster
·
Constructors cannot be friend functions because they are part of the class and designed to initialize the object.
·
Constructors are called only during object creation. When an object is destroyed, destructors (not constructors) are called.