Difference between Overloading and Overriding?

Answer Posted / shoaib

1. Overloading doesn't block inheritence from the
superclass where as Overriding blocks inheritance.

2. Overloading -> If 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

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

4. In overloading function name are same but signatures
parameters are different .while in overriding function name are as well as argument are same in drive class as in super class.

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which bitwise operator is used to check whether a particular bit is on or off?

594


How can you quickly find the number of elements stored in a static array? Why is it difficult to store linked list in an array?

587


What are pointer-to-members? Explain.

636


What is constructor and destructor in c++?

621


How should a contructor handle a failure?

690






Difference between pointer to constant vs. Pointer constant

585


How to declare a pointer to an array of integers?

649


What does count ++ do in c++?

695


Differentiate between a copy constructor and an overloaded assignment operator.

645


How did c++ get its name?

575


What is enum c++?

618


which of the following is not an secondary constant a) array b) real c) union

1272


What are abstract data types in c++?

540


what is the use of void main() in C++ language?

641


What is singleton class in c++?

596