1.

Which concept is needed because of implicit type casting use?(a) Static binding(b) Dynamic binding(c) Compile time binding(d) Source code bindingI had been asked this question by my college professor while I was bunking the class.Origin of the question is Upcasting topic in portion Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming

Answer»

Right option is (b) Dynamic binding

The best explanation: SINCE the implicit type casting ALLOWS casting of a base class pointer to refer to its derived class OBJECT or even base class object. We need dynamic type casting so that the references can be RESOLVED during execution of program.



Discussion

No Comment Found

Related InterviewSolutions