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

Question: 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

Cpp Programming 81 – Which one of the following options is correct about the statement given below? The compiler checks the type of reference in the object and not the type of object.

Question: Which one of the following options is correct about the statement given below? The compiler checks the type of reference in the object and not the type of object.
[A]. Inheritance
[B]. Polymorphism[C]. Abstraction
[D]. Encapsulation

Answer: Option B