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 are the events occur in intr activated on interrupt vector table

1178


what is a class? Explain with an example.

617


True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends

1855


Is c++ still in demand?

632


What do you mean by a template?

621






Explain Memory Allocation in C/C++ ?

634


What is runtime polymorphism in c++?

586


What is #include cmath?

657


Why do we use double in c++?

598


If a header file is included twice by mistake in the program, will it give any error?

550


Is c++ a software?

724


Describe public access specifiers?

581


What is ios :: in in c++?

631


Write a code/algo to find the frequency of each element in an array?

601


Why is c++ awesome?

576