Which of the following is not true about constructor? When an object is…
2026
Which of the following is not true about constructor?
When an object is created and initialized at the same time, a copy constructor gets called.
They do not have return types, not even void.
They can be virtual.
They can not be inherited, though a derived class can call the base class constructor.
- A.
When an object is created and initialized at the same time, a copy constructor gets called.
- B.
They do not have return types, not even void.
- C.
They can be virtual.
- D.
They can not be inherited, though a derived class can call the base class constructor.
Attempted by 58 students.
Show answer & explanation
Correct answer: C
Constructors initialize objects but cannot be virtual since the vtable is not yet established. This prevents polymorphic behavior during object creation. Options stating they lack return types or are not inherited are true, making the virtual claim false.