Exercise: Oops Concepts

Questions for: Oops Concepts

Which of the following is not a type of inheritance?
A:
Multiple
B:
Multilevel
C:
Distributive
D:
Hierarchical
Answer: C
No answer description is available. Let's discuss.
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: C
No answer description is available. Let's discuss.
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: D
No answer description is available. Let's discuss.
Which of the following is correct about the statements given below?
  1. All operators can be overloaded in C++.
  2. 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: B
No answer description is available. Let's discuss.
Which of the following is a mechanism of static polymorphism?
A:
Operator overloading
B:
Function overloading
C:
Templates
D:
All of the above
Answer: D
No answer description is available. Let's discuss.
Ad Slot (Above Pagination)
Quiz