Which of the following can be overridden in a derived C++ class?
Options
- A. Virtual member function
- B. Data member
- C. Constructor
- D. More than one of the above
- E. None of the above
Quiz Practice:
A. Virtual member function
Answer: Virtual member function
A virtual member function can be overridden in a derived class to provide a different implementation.
Constructors cannot be overridden because they are not inherited in the normal sense. Data members also do not participate in function overriding.