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 is the importance of mutable keyword?

0 Answers  


founder of c++

7 Answers   Microtek, TCS, TeleCommand,


How do you generate a random number in c++?

0 Answers  


Comment on c++ standard exceptions?

0 Answers  


What are the vectors in c++?

0 Answers  


Explain the pure virtual functions?

0 Answers  


How to implement flags?

2 Answers   Symphony,


Explain about Virtual Function in C++?

0 Answers  


Can class objects be passed as function arguments?

0 Answers   HCL,


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

0 Answers  


What is the difference between structure and class?

0 Answers  


What is the use of main function in c++?

0 Answers  


Categories