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

Program to check whether a word is a sub-string or not of a string typed

1589


What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?

611


What are different types of loops in c++?

647


What are stacks?

605


Why is c++ not purely object oriented?

558






Explain the pure virtual functions?

627


How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?

637


Is c++ high level programming language?

669


What is endl c++?

599


Do vectors start at 0?

588


what are Access specifiers in C++ class? What are the types?

619


Who made c++?

603


Can you Mention some Application of C/C++?

620


Explain the volatile and mutable keywords.

612


What is the use of map in c++?

599