C++ Programming - Objects and Classes

Exercise : Objects and Classes - General Questions
16.
How many objects can be created from an abstract class?
Zero
One
Two
As many as we want
Answer: Option
Explanation:
No answer description is available. Let's discuss.

17.
What does the class definitions in following code represent?
class Bike
{
    Engine objEng;
};
class Engine
{
    float CC;
};
kind of relationship
has a relationship
Inheritance
Both A and B
Answer: Option
Explanation:
No answer description is available. Let's discuss.

18.
Which of the following statements is correct when a class is inherited privately?
Public members of the base class become protected members of derived class.
Public members of the base class become private members of derived class.
Private members of the base class become private members of derived class.
Public members of the base class become public members of derived class.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

19.
Which of the following statements is correct?
Data items in a class must be private.
Both data and functions can be either private or public.
Member functions of a class must be private.
Constructor of a class cannot be private.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

20.
What does a class hierarchy depict?
It shows the relationships between the classes in the form of an organization chart.
It describes "has a" relationships.
It describes "kind of" relationships.
It shows the same relationship as a family tree.
Answer: Option
Explanation:
No answer description is available. Let's discuss.