Q. What happens if the base and derived class contains definition of a function with same prototype?

  • (A) Base class object will call base class function and derived class object will call derived class function.
  • (B) Only derived class function will get called irrespective of object.
  • (C) Only base class function will get called irrespective of object.
  • (D) Compiler reports an error on compilation.
πŸ’¬ Discuss
βœ… Correct Answer: (A) Base class object will call base class function and derived class object will call derived class function.

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
239
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
93%
Success Rate