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
Program to check whether a word is a sub-string or not of a string typed
What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?
What are different types of loops in c++?
What are stacks?
Why is c++ not purely object oriented?
Explain the pure virtual functions?
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?
Is c++ high level programming language?
What is endl c++?
Do vectors start at 0?
what are Access specifiers in C++ class? What are the types?
Who made c++?
Can you Mention some Application of C/C++?
Explain the volatile and mutable keywords.
What is the use of map in c++?