Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Difference between Overloading and Overriding?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are shallow and deep copy?

1126


What is setfill c++?

1166


What is c++ & why it is used?

1106


Why is c++ considered difficult?

1161


Explain what is class definition in c++ ?

1132


What is the difference between the compiler and the preprocessor?

1132


You run a shell on unix system. How would you tell which shell are you running?

1178


What is iterator in c++?

1125


What is public, protected, private in c++?

1159


How do you clear a set in c++?

1087


Explain one-definition rule (odr).

1126


Is there any function that can skip certain number of characters present in the input stream?

1081


Can a program run without main function?

1178


What is the difference between a baller and a reference in C++?

1130


Describe new operator?

1169