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

List the special characteristics of constructor.

0 Answers  


What is the default access level?

0 Answers  


Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.

0 Answers   Nucleus, TCS,


When you overload member functions, in what ways must they differ?

0 Answers  


What is the function to call to turn an ascii string into a long?

0 Answers  






You want to link a c++ program to c functions. How would you do it?

0 Answers  


Define a nested class. Explain how it can be useful.

0 Answers  


Who made c++?

0 Answers  


What is the history of c++?

0 Answers  


What do you mean by function overriding & function overloading in c++?

0 Answers  


What is the difference between new/delete and malloc/free?

1 Answers  


How do you define/declare constants in c++?

0 Answers  


Categories