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
Which bitwise operator is used to check whether a particular bit is on or off?
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?
What are pointer-to-members? Explain.
What is constructor and destructor in c++?
How should a contructor handle a failure?
Difference between pointer to constant vs. Pointer constant
How to declare a pointer to an array of integers?
What does count ++ do in c++?
Differentiate between a copy constructor and an overloaded assignment operator.
How did c++ get its name?
What is enum c++?
which of the following is not an secondary constant a) array b) real c) union
What are abstract data types in c++?
what is the use of void main() in C++ language?
What is singleton class in c++?