(A) public members of Derv
(B) protected members of Derv
(C) private members of Derv
(D) protected members of Base
Tag: Object Oriented Programming Mcqs
Which of the following is the best approach if it is required to have more than one functions having exactly same functionality and implemented on different data types?
(A) Templates
(B) Overlaoding
(C) Data hiding
(D) Encapsulation
What is true about function templates?
(A) The compiler generates only one copy of the function template
(B) The compiler generates a copy of function respective to each type of data
(C) The compiler can only generate copy for the int type data
(D) None of the above
Which one of the following terms must relate to polymorphism?
(A) Static allocation
(B) Static typing
(C) Dynamic binding
(D) Dynamic allocation
A template provides a convenient way to make a family of?
(A) variables and data members
(B) functions and classes
(C) classes and exceptions
(D) programs and algorithms
Public Inheritance represents?
(A) “IS A” relationship
(B) ―Has A‖ relationship
(C) ―IS Special Kind of‖ relationship
(D) None of the above
Adding a derived class to a base class requires fundamental changes to the base class.
(A) True
(B) False
We can call base class constructor from derived class constructor?
(A) From derived class constructor body
(B) From the initializer list of derived class constructor
(C) From any member function of derived class
(D) We can not call the base class constructor