GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C++
Go To First  |  Previous Question  |  Next Question 
 C++  |  Question 37 of 203    Print  
What is the difference between "overloading" and "overriding"?

  
Total Answers and Comments: 3 Last Update: March 14, 2006     Asked by: suji 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Richa
 
Overloading a method (or function) in C++ is the ability for functions of the same name to be defined as long as these methods have different signatures (different set of parameters). Method overriding is the ability of the inherited class rewriting the virtual method of the base class.

Above answer was rated as good by the following members:
YaelG, sabesan
September 28, 2005 09:02:34   #1  
Richa        

RE: What is the difference between "overloading" and "...
Overloading a method (or function) in C++ is the ability for functions of the same name to be defined as long as these methods have different signatures (different set of parameters). Method overriding is the ability of the inherited class rewriting the virtual method of the base class.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
March 04, 2006 23:43:09   #2  
priya        

RE: What is the difference between "overloading" and "...
overloading: the same function can perform different operations.overridding: the derived class can rewrite the content of the base class.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
March 13, 2006 23:54:55   #3  
swarn kant        

RE: What is the difference between "overloading" and "...

All the above answers are right this is one more refinement.

overridding is runtime polymorphism while overloading is compile time polymorphism.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape