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 are advantages of using friend classes?
What is a singleton class c++?
Mention the purpose of istream class?
What are the syntactic rules to be avoid ambiguity in multiple inheritance?
Can user-defined object be declared as static data member of another class?
Can malloc be used in c++?
Is map sorted c++?
What is c++ code?
What is the use of bit fields in structure declaration?
What is virtual destructor ans explain its use?
Explain method of creating object in C++ ?
What does new in c++ do?
How does a copy constructor differs from an overloaded assignment operator?
write a c++ program to create class student having datamember name,Roll_no,age,and branch intilcization all the member using constructor print the all the details on the screen.
What is :: operator in c++?