Difference between Overloading and Overriding?

Answer Posted / george ananth

Overloading(Early Binding):
-> having more than one method with the same name but different signature(argument type, return type, no of argument etc)

-> Compile time Polymorphism because in the compile time system required to find which method is called


Overriding(Late Binding):
-> If the function of base class is redefined in in the derived class is called overriding..The method name and signature of the base class must be same in the derived class (this is done using "virtual and override keyword or new keyword)

-> Run time Polymorphism because system doesn't know which method need to invoke at the compile time..

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meaning of in c++?

670


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

616


What is the arrow operator in c++?

558


Difference between inline functions and macros?

598


What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number

780






Which operations are permitted on pointers?

566


Can we define function inside main in c++?

553


What is a local variable?

572


Is c better than c++?

611


Write is a binary search tree? Write an algo and tell complexity?

591


What are vtable and vptr?

616


Is c++ faster than c?

592


What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?

601


When can I use a forward declaration?

624


How would you call C functions from C++ and vice versa?

634