C++ Programming - Objects and Classes

Exercise : Objects and Classes - General Questions
11.
Which of the following can access private data members or member functions of a class?
Any function in the program.
All global functions in the program.
Any member function of that class.
Only public member functions of that class.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

12.
Which of the following type of data member can be shared by all instances of its class?
Public
Inherited
Static
Friend
Answer: Option
Explanation:
No answer description is available. Let's discuss.

13.
Which of the following also known as an instance of a class?
Friend Functions
Object
Member Functions
Member Variables
Answer: Option
Explanation:
No answer description is available. Let's discuss.

14.
Constructor is executed when _____.
an object is created
an object is used
a class is declared
an object goes out of scope.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

15.
Which of the following statements about virtual base classes is correct?
It is used to provide multiple inheritance.
It is used to avoid multiple copies of base class in derived class.
It is used to allow multiple copies of base class in a derived class.
It allows private members of the base class to be inherited in the derived class.
Answer: Option
Explanation:
No answer description is available. Let's discuss.