Multiple choice technology programming languages

What is abstract class?

  1. A class which can not be inherited

  2. A class which can have only single object

  3. A class which can not have any objects

  4. A class which can not inherit other classes

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

An abstract class in C++ is a class that contains at least one pure virtual function and cannot be instantiated directly - meaning you cannot create objects of the abstract class type itself. However, you CAN create pointers/references to it, and you MUST derive from it to create objects of the derived classes. Option A is incorrect because abstract classes are designed to be inherited. Option D is wrong because abstract classes can inherit from other classes.