\begin{tabular}{|l} Which of the following is not allowed? \\ \( \begin{array}{l}\text { Arrays of pointers to abstract classes. } \\ \text { References to abstract classes. } \\ \text { Multiple pure virtual functions in a single class } \\ \text { Objects of abstract classes }\end{array} \)\end{tabular}
Upstudy AI Solution
Answer
Solution

Sign in to Unlock Answers for Free!
A Learning Platform Trusted by Millions of Real Students and Teachers.

Answered by UpStudy AI and reviewed by a Professional Tutor
Bonus Knowledge
In C++, abstract classes are those that contain at least one pure virtual function, which means the class cannot be instantiated directly. Therefore, trying to create objects of abstract classes is a big no-no! Attempting to instantiate an abstract class will lead to compilation errors, ensuring that the design enforces the use of derived classes. Even though you can't instantiate abstract classes, you can certainly create arrays of pointers to them and define references. This flexibility allows you to manage polymorphic behavior effectively. When dealing with multiple pure virtual functions, it’s perfectly fine - you can have as many as you need within a single abstract class to define the required interface!