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
What is meaning of in c++?
When there is a global variable and local variable with the same name, how will you access the global variable?
What is the arrow operator in c++?
Difference between inline functions and macros?
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
Which operations are permitted on pointers?
Can we define function inside main in c++?
What is a local variable?
Is c better than c++?
Write is a binary search tree? Write an algo and tell complexity?
What are vtable and vptr?
Is c++ faster than c?
What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?
When can I use a forward declaration?
How would you call C functions from C++ and vice versa?