C++ MQCs with Explanation (CHAPTER : POINTERS, VIRTUAL FUNCTIONS AND POLYMORPHISM )

Which of the following statements is TRUE?

  1. All virtual functions in an abstract base class must be declared as pure virtual functions
  2. A class is made abstract by declaring it virtual
  3. If a base class declares a pure virtual function, all derived classes must define the function
  4. A derived class cannot contain a pure virtual function



Answer: 
Option c: If a base class declares a pure virtual function, all derived classes must define the function

Explanation Here

Post a Comment

0 Comments