Which statement about constructors in an abstract C++ class is correct?

Options

  • A. An abstract class cannot have a constructor
  • B. An abstract class can have a constructor
  • C. An abstract class can only have a private constructor
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. An abstract class can have a constructor

Detailed Explanation

Correct Answer: Option B

Explanation:
An abstract class can have constructors, data members, and ordinary member functions. Its constructor can be called as part of constructing an object of a concrete derived class, even though an abstract class cannot be instantiated directly.