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
What are virtual constructors/destructors?
What is constant in c++ with example?
How a new operator differs from the operator new?
Can we make any program in c++ without using any header file and what is the shortest program in c++.
What is data type in c++?
Write a code/algo to find the frequency of each element in an array?
Why do we use structure in c++?
What are namespaces in c++?
Explain what is oop?
What are friend classes?
What do you mean by delegate? Can a user retain delegates?
What is the header file for setw?
declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator
explain the reference variable in c++?
Mention the storage classes in c++.