4. Out of the following, which is not a member of the class?
a) Static function
b) Friend function
c) Constant function
d) Virtual function
A:Friend function is not a member of the class. They are given the same access rights as the class member function have but they are not actual members of the class.
7. Why references are different from pointers?
a) A reference cannot be made null
b) A reference cannot be changed once initialized
c) No extra operator is needed for dereferencing of a reference
d) All of the mentioned
A:References cannot be made null whereas a pointer can be. References cannot be changed whereas pointers can be modified.
Pointers need * operator to dereference the value present inside it whereas reference does not need an operator for dereferencing.
8. Which of the following provides a programmer with the facility of using object of a class inside other classes?
a) Inheritance
b) Composition
c) Abstraction
d) Encapsulation
A:The concept of using objects of one class into another class is known as Composition.
There are two types of polymorphism in C++ namely run-time and compile-time polymorphisms.Run-time polymorphism is implemented using Inheritance and virtual in which object decides which function to call.Compile-time polymorphism is implemented using templates in which the types(which can be checked during compile-time) are used decides which function to be called.
13. Which concept means the addition of new components to a program as it runs?
a) Data hiding
b) Dynamic binding
c) Dynamic loading
d) Dynamic typing
A:Dynamic loading is the concept of adding new components to a program as it runs.
14. Which of the following explains the overloading of functions?
a) Virtual polymorphism
b) Transient polymorphism
c) Ad-hoc polymorphism
d) Pseudo polymorphism
A:Ad-hoc polymorphism is a type of polymorphism in which a function denotes heterogeneous implementation depending upon the types of argument.
原文:https://www.cnblogs.com/hhlys/p/13062845.html