Question

    What happens when both the base and derived class

    contain definitions for a function with the same prototype?
    A The compiler reports an error Correct Answer Incorrect Answer
    B Only the base class function will get called Correct Answer Incorrect Answer
    C The base class function calls the base class function, and the derived class object calls the derived class function Correct Answer Incorrect Answer
    D Only the derived class function will get called Correct Answer Incorrect Answer
    E None of these Correct Answer Incorrect Answer

    Solution

    The correct answer is C

    Practice Next