General Questions (Set - 3)

Question 1 :

Which of the following is a mechanism of static polymorphism?


A). Operator overloading
B). Function overloading
C). Templates
D). All of the above
Answer : Option D

Question 2 :

Which of the following is correct about the statements given below?

All operators can be overloaded in C++.
We can change the basic meaning of an operator in C++.


A). Only I is true.
B). Both I and II are false.
C). Only II is true.
D). Both I and II are true.
Answer : Option B

Question 3 :

What happens if the base and derived class contains definition of a function with same prototype?


A). Compiler reports an error on compilation.
B). Only base class function will get called irrespective of object.
C). Only derived class function will get called irrespective of object.
D). Base class object will call base class function and derived class object will call derived class function.
Answer : Option D

Question 4 :

Which of the following are available only in the class hierarchy chain?


A). Public data members
B). Private data members
C). Protected data members
D). Member functions
Answer : Option C

Question 5 :

Which of the following is not a type of inheritance?


A). Multiple
B). Multilevel
C). Distributive
D). Hierarchical
Answer : Option C