What happens if the base and derived class contains definition of a function with same prototype? Compiler reports an error on compilation. Only base class function will get called irrespective of object. Only derived class function will get called irrespective of object. Base class object will call base class function and derived class object will call derived class function?
Answers
Answered by
0
Answer:
Base class object will call base class function and derived class object will call derived class function.
please mark it brainliest
and
follow me
Answered by
0
Compiler reports an error on compilation.
if the base and derived class contains definition of a function with same prototype.
- A compilation error happens when a compiler cannot convert a section of source code for a computer programme due to errors in the code or, less commonly, due to errors in the compiler itself. Debugging the source code can help programmers fix compilation mistakes quite frequently.
- Static polymorphism is implemented via Templates, Operator Overloading, and Function Overloading. Solution.The process of connecting a function and an object at compile time is known as static polymorphism.
- Another word for it is "static binding." A final class cannot be extended into a subclass. Implicitly, all methods of a final class are final. An illustration of a final class is the class String. If you had the ability to extend the String class, objects of that class could be used anywhere that Strings are expected.
#SPJ6
Similar questions