Difference between Overloading and Overriding?

Answers were Sorted based on User's Feedback



Difference between Overloading and Overriding?..

Answer / samba

Overloading: We can use same method name and different
arguments, number of arguments and type of arguments, and it
is also called as Compiletime Polymorphism, EarlyBinding and
StaticBinding.
Ex: int add(int a,int b);
int add(int a, float b);
float add(int a, float b, float c);


Overriding: We can use same method name and same arguments
to perfrom our own functionality, and it is also called as
Runtime Polymorphism,LateBinding and Dynamic Binding.
Ex: int add(int,int);
int add(int,int);

Is This Answer Correct ?    1 Yes 0 No

Difference between Overloading and Overriding?..

Answer / akash monga

overloading is just brain cracker and overridding is more difficult than overloading and if u agree with me than plz mail at Ak47monga@gmail.com

Is This Answer Correct ?    1 Yes 0 No

Difference between Overloading and Overriding?..

Answer / yesha

OVERLOADING MEANS WE CAN USE SAME FUNCTION NAME WITH DIFFERENT ARGUMENT IN FUNCTION OVERRIDING WE CAN ONLY USE SAME NAME OF THE FUNCTION AND SAME ARGUMENT BUT IN A DIFFERENT CLASS BECAUSE COMPILER WILL NOT CONFUSED

Is This Answer Correct ?    1 Yes 0 No

Difference between Overloading and Overriding?..

Answer / ankur kumar

Difference in one word is "SCOPE".

Is This Answer Correct ?    1 Yes 0 No

Difference between Overloading and Overriding?..

Answer / vetrivel

Overloading vs. overriding

1.Overriding of functions occurs when one class is inherited from another class. Overloading can occur without inheritance.
2.Overloaded functions must differ in function signature ie either number of parameters or type of parameters should differ. In overriding, function signatures must be same.
3.Overridden functions are in different scopes; whereas overloaded functions are in same scope.
4.Overriding is needed when derived class function has to do some added or different job than the base class function.
5.Overloading is used to have same name functions which behave differently depending upon parameters passed to them.

Is This Answer Correct ?    1 Yes 0 No

Difference between Overloading and Overriding?..

Answer / bharathi

overloading is a process of using the same name function in
different places in the same class it can make useful of
reusability and to save the memory to need not write entire
program where we want.here one thing is wirh or without
inheritance we can use overloading.
whereas overriding means having same name and same acess
specifiers,same returntype,same modifiers as same in the
base class.

Is This Answer Correct ?    0 Yes 0 No

Difference between Overloading and Overriding?..

Answer / stephen-pipes afrifa

Overloading: The function name is the same but the
parameters are different or have different signature

Overriding: The member function having the same name and
types of parameters as function in the base class.

Is This Answer Correct ?    0 Yes 0 No

Difference between Overloading and Overriding?..

Answer / kakani sirisha

Overloading is code refinement technique and OverRiding is code replacement technique..
In OverLoading no seperate keywords are used to implement but in OverRiding we use virtual keyword for base class and overriding keyword for derived class function to implement...

Is This Answer Correct ?    0 Yes 0 No

Difference between Overloading and Overriding?..

Answer / adeelshahid

How can i stop getting emails from this answer

http://www.thehtmlcoders.com

Is This Answer Correct ?    0 Yes 0 No

Difference between Overloading and Overriding?..

Answer / akash monga

c++ found in 1970 to 1979 by bjarne and is also known as c with classes.and c is derived in 1965 to 1969 by dennis ritchard

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What are the advantages of c++? Explain

0 Answers  


Explain "passing by value", "passing by pointer" and "passing by reference" ?

5 Answers  


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

4 Answers   Webyog,


What is flush c++?

0 Answers  


What is the default width for ouputting a long integer using the insertion operator?

0 Answers  






What is the maximum value of a unsigned char a) 255 b) 256 c) 128

0 Answers  


why we cant create array of refrences

4 Answers  


Is c++ used anymore?

0 Answers  


Consider a c++ template funtion template<class T> T& Add(T a, T b){return a+b ;} if this function is called as T c = Add("SAM", "SUNG"); what will happen? What is the problem in the template declaration/ How to solve the problem.

7 Answers   LG, Samsung,


What is else syntax in c++?

0 Answers  


is throwing exception from a constructor not a good practice ?

5 Answers   Ericsson,


What is abstraction c++?

0 Answers  


Categories