Multiple choice technology programming languages

Which of the following statement(s) is(are) correct?

  1. constructors can be virtual

  2. destructors can be virtual

  3. constructors can be overloaded

  4. virtual functions are fast in execution

Reveal answer Fill a bubble to check yourself
B,C Correct answer
Explanation

Constructors CANNOT be virtual because they initialize objects and virtual dispatch mechanisms (vtables) aren't available until after construction completes. Destructors CAN and SHOULD be virtual when a class is designed for polymorphism to ensure proper cleanup of derived class resources. Constructors CAN be overloaded (multiple constructors with different parameters). Virtual functions have slight performance overhead due to vtable lookup, so they're slower than direct function calls.