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

Answers were Sorted based on User's Feedback



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

Answer / shivanannd

overloading means that we can use same method with same
name many times for multiple purpose in a class with
difference parameters.

overriding means we can refer a method of a base class with
same name in a derived class with same paameters.

Is This Answer Correct ?    8 Yes 0 No

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

Answer / 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

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

Answer / vighnesh

Overloading uses same funtion with different parameters

Overriding Uses same exactly similar funtion prototypes
this used in runtime polimorphism ie Virtual Funtions

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C++ General Interview Questions

What are the basics concepts of OOPS?

1 Answers  


What is virtual base class?

0 Answers  


How the delete operator differs from the delete[]operator?

0 Answers  


What parameter does the constructor to an ofstream object take?

0 Answers  


How to give an alternate name to a namespace?

0 Answers  






What is the size of pointer ? Also size of pointer in 64 bit pointer

4 Answers  


What are the uses of pointers?

0 Answers  


Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work

0 Answers  


Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.

0 Answers  


In what situations do you have to use initialization list rather than assignment in constructors?

0 Answers  


implement stack using stack.h headerfile functions

1 Answers   Exilant, GMG, Subex, University,


Is it possible to use a new for the reallocation of pointers ?

0 Answers  


Categories