Difference between Overloading and Overriding?

Answer Posted / kunal

Overloading - Two or more functions having same name but
different siganture(i.e arguements or return types) for eg.
we have a function named as area then
area();,float area();,area(float a,float b);,float area
(float a,float b);

Overriding - When a function of base class is re-defined in
the derived class.for eg.
base class
{
area(float a,float b);
}
derive class
{
float area();
}

Is This Answer Correct ?    42 Yes 109 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is setw manipulator in c++?

591


What is the difference between reference and pointer?

610


Describe delete operator?

616


What is the use of data hiding?

590


What are the various compound assignment operators in c++?

542






Why we use #include iostream in c++?

571


Which format specifier is used for printing a pointer value?

569


Can class objects be passed as function arguments?

597


Which operator cannot be overloaded c++?

583


What are the advantages of using a pointer? Define the operators that can be used with a pointer.

597


What parameter does the constructor to an ofstream object take?

605


Should I learn c or c++ first?

562


Why do we use vector in c++?

592


What is ostream in c++?

567


Write about a nested class and mention its use?

621