:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Programming Languages >> C++ >> C++ General


 STL interview questions  STL Interview Questions (91)
 OOPS interview questions  OOPS Interview Questions (558)
 C++ General interview questions  C++ General Interview Questions (458)
Difference between Overloading and Overriding?
 Question Submitted By :: C++-General
I also faced this Question!!     Answer Posted By  
# 1
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 ?    767 Yes 98 No
# 2
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
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

4.overloading must have different method signatures where
as overriding must have same signature.
Is This Answer Correct ?    446 Yes 73 No
# 3
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 ?    278 Yes 61 No
# 4
Overloading is compile time binding, where as overriding is
dynamic binding.
Is This Answer Correct ?    120 Yes 37 No
# 5
Overloading is compile time binding, where as overriding is
dynamic binding.....
Is This Answer Correct ?    92 Yes 22 No
Ramesh Pedhamalla
# 6
* 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 ?    87 Yes 23 No
Gaurav Rawat
# 7
overloading: same name but different signatures in same class
overriding: same name and same signature defined in
different class.
Is This Answer Correct ?    93 Yes 32 No
Meenu Kathuria
# 8
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 ?    94 Yes 34 No
Adeel Shahid
# 9
It does not block superclass method it will override the
super class method
Is This Answer Correct ?    85 Yes 61 No
# 10
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 ?    12 Yes 4 No
Mansi Shah

Other C++ General Interview Questions
  Question Asked @ Answers
print first nodd numbers in descending order   5
What is "map" in STL?   2
What is the difference between Char a[ ]=”string” and char *a=”String” Adobe 11
What are the different types of Storage classes?   5
Which one of the following describes characteristics of "protected" inheritance? a) The base class has access only to the public or protected members of the derived class. b) The derived class has non-public, inheritable, access to all but the private members of the base class. c) The derived class has access to all members of the base class. d) The private members of the base class are visible within the derived class. e) Public members of the derived class are privately accessible from the base class. Quark 4
Adobe Interview & Adobe Placement Paper Adobe 1
What will happen if when say delete this ?   7
What is Pure Virtual Function? Why and when it is used ? Lucent 9
Consider the following code fragment: int main(void) { int m = 4; mystery ( m ); mystery ( m ); printf("%d", m); return 0; } What is the output on the monitor if mystery is defined as follows ? void mystery (int m) { m = m+3; } CDAC 2
What are the different types of polymorphism?   3
What is Memory Alignment? TCS 2
What is the difference between Pointer and a Reference? When you would use them? Wipro 4
For more C++ General Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright © 2013  All Rights Reserved.   ::