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 different operators in C++?

3 Answers   HP,


what is upcasting in C++?

0 Answers  


What is std :: endl?

0 Answers  


What is the use of typedef?

0 Answers  


daily Routine of father

0 Answers  






Explain selection sorting?

0 Answers  


What is the best c++ compiler?

0 Answers  


What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?

0 Answers  


Is c++ built on c?

0 Answers  


Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].

0 Answers  


Why do we need c++?

0 Answers  


What are the benefits of operator overloading?

0 Answers  


Categories