Difference between Overloading and Overriding?

Answer Posted / mansi shah

Overloading is evaluaated at compile time whereas
Overriding is evaluated at Run Time.

Overloading method has different Parameters but same name
whereas Overriding is just the implementation of method
define din Base Class.

Overloading does not interfere Base Class whereas
Overriding method must require the method which is declared
in Base Class.

Overloading can be defined in one class,in short term it
does not require separate Base Class to implement the
method,whereas for implementing method overriding the Base
class is necessary..

Is This Answer Correct ?    21 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between global int and static int declaration?

403


What are references in c++? What is a local reference?

569


What is a set in c++?

529


How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?

580


What is lambda expression c++?

574






Why we use #include iostream in c++?

572


A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

3237


Explain shallow copy?

610


When must you use a pointer rather than a reference?

598


Explain differences between new() and delete()?

615


Where and why do I have to put the "template" and "typename" keywords?

578


Explain linked list using c++ with an example?

627


Which operations are permitted on pointers?

564


Explain function overloading

583


Is empty stack c++?

519