What is the difference between "overloading" and "overridding"?

Answer Posted / shakti singh khinchi

Overloading: When more then 1 methods in a class having same
name but they are different in their number of parameters,
different in their parameters types and their order.

Overriding: When a parent class is derived by a child class
and some method which has present in parent class which is
declared as "virtual" in parent class , same method with
same name and parameters and sam type is also declared in
child class without "virtual" keyword, bcz it is by default
virtual in child. SO PARENT AND CHILD CLASS USES SAME METHOD
ARE CALLED OVERRIDING.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we get the value of ios format flags?

657


What is auto type c++?

628


What does new return if there is insufficient memory to make your new object?

582


What is the oldest programming language?

566


Can we change the basic meaning of an operator in c++?

651






what is Loop function? What are different types of Loops?

639


Why do we use using namespace std in c++?

599


What is a null object in c++?

631


How can you quickly find the number of elements stored in a static array?

634


Is there a c++ certification?

602


Why c++ is faster than java?

592


What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor

672


What is the difference between the functions memmove() and memcpy()?

628


What does std mean in c++?

581


Which sort does c++ use?

577