Q:

What is Overriding in c++?

0

What is Overriding?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

Overriding a method means that replacing a function functionality in child class. To imply overriding functionality we need parent and child classes. In the child class, you define the same method signature as one defined in the parent class.

In simple words, when the base class and child class have member functions with exactly the same name, same return type, and same parameter list, then it is said to be function overriding.

Condition for the function overriding is:

  • Must have the same method name.
  • Must have the same data type.
  • Must have the same argument list.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Interview Questions and Answers(2022)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write a C++ program that describes function Overri... >>
<< Can you overload a function based only on whether ...