Difference between Overloading and Overriding?




Answers were Sorted based on User's Feedback



Difference between Overloading and Overriding?..

Answer / swetcha

Overloading - Two functions having same name and return
type, but with different type and/or number of arguments.
Overriding - When a function of base class is re-defined in
the derived class.

Is This Answer Correct ?    850 Yes 105 No

Difference between Overloading and Overriding?..

Answer / janet

1. In overloading,there is a relation ship between methods
available in the same class where as in overridding,there
is relationship between a super class method and subclass
method.
2. overloading doesn't block inheritence from the
superclass where as overridding blocks inheritence.

3. in overloading,seperate methods share the same name
where as in overridding,subclass methods replaces the
superclass.

4.overloading must have different method signatures where
as overriding must have same signature.

Is This Answer Correct ?    482 Yes 79 No

Difference between Overloading and Overriding?..

Answer / shivanand

The main difference between overloading and overriding is
that in overloading we can use same function name with
different parameters for multiple times for different tasks
with on a class.
and overriding means we can use same name fiunction name
with same parameters of the base class in the derived class.
this is also called as reusability of code in the programme.

Is This Answer Correct ?    311 Yes 67 No




Difference between Overloading and Overriding?..

Answer / natarajan

Overloading is compile time binding, where as overriding is
dynamic binding.

Is This Answer Correct ?    149 Yes 40 No

Difference between Overloading and Overriding?..

Answer / ramesh pedhamalla

Overloading is compile time binding, where as overriding is
dynamic binding.....

Is This Answer Correct ?    112 Yes 25 No

Difference between Overloading and Overriding?..

Answer / gaurav rawat

* in overloading function name are same but signatures
(argument) are different .
while in overriding function name are as well as argument
are same in drive class as in super class.
* for overloading can be done in one class but
for overriding there is necessary that at least two class
should be present.

Is This Answer Correct ?    101 Yes 24 No

Difference between Overloading and Overriding?..

Answer / meenu kathuria

overloading: same name but different signatures in same class
overriding: same name and same signature defined in
different class.

Is This Answer Correct ?    103 Yes 34 No

Difference between Overloading and Overriding?..

Answer / adeel shahid

overriding is done in the base class where the parent class
method is overridden by a method of the same signature.

Overloading is done in the same class on functions with
input parameters differing in number or type.

Is This Answer Correct ?    98 Yes 36 No

Difference between Overloading and Overriding?..

Answer / n.balasutha

It does not block superclass method it will override the
super class method

Is This Answer Correct ?    93 Yes 63 No

Difference between Overloading and Overriding?..

Answer / mansi shah

Overloading is evaluaated at compile time whereas
Overriding is evaluated at Run Time.

Overloading method has different Parameters but same name
whereas Overriding is just the implementation of method
define din Base Class.

Overloading does not interfere Base Class whereas
Overriding method must require the method which is declared
in Base Class.

Overloading can be defined in one class,in short term it
does not require separate Base Class to implement the
method,whereas for implementing method overriding the Base
class is necessary..

Is This Answer Correct ?    21 Yes 10 No

Post New Answer



More C++ General Interview Questions

Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ].

1 Answers  


Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

0 Answers   Cankaya University,


What is Object Oriented programming.what is the difference between C++ and C?

8 Answers   Infosys,


How to construct virtual constructor

6 Answers   Symphony, CIStems Software,


I need to find a specific string between two strings how do I do it?

1 Answers   Infosys,






tell me about yourself ?i want answer for frehers with various exasmples?

2 Answers   HCL,


What is the output of: String a1 = "Hello"; String a2 = "world!"; String* s1 = &a2; String& s2 = a1; s1 = &a1; s2 = a2; std::cout << *s1 << " " << s2 << std::endl;

4 Answers   Lehman Brothers,


What is RTRT tool?can it be used for automation?can it work on packet PC?

3 Answers  


write a programming using for loop in c++ to generate diamond trangel?

1 Answers   NIIT,


Difference between Constructors and static constructors?

3 Answers   TCS, IBM,


write a program in c++ to implement stack using functions in header file stack.h

3 Answers   Google, Subex,


class basex { int x; public: void setx(int y) {x=y;} }; class derived : basex {}; What is the access level for the member function "setx" in the class "derived" above? a) private b) local c) global d) public e) protected

3 Answers   Quark,






Categories