Difference between Overloading and Overriding?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you master coding?

554


What do you mean by global variables?

560


Can you please explain the difference between using macro and inline functions?

515


What is vector string in c++?

564


What is the maximum combined length of command line arguments including the space between adjacent arguments?

586






Explain virtual class and friend class.

589


What is operators in c++?

561


What are the advantages of c++?

585


When do we use copy constructors?

587


How do you print a string on the printer?

569


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

516


When there is a global variable and local variable with the same name, how will you access the global variable?

612


What data structure is fastest, on average, for retrieving data: a) Binary Tree b) Hash Table c) Stack

576


What is the type of 'this' pointer?

589


Which should be more useful: the protected and public virtuals?

590