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 is the use of 'this' pointer?
Define whitespace in C++.
What are namespaces in c++?
What is virtual destructor? What is its use?
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
What is a hashmap c++?
What is stream and its types in c++?
Why do we need function?
What is the keyword auto for?
Write a program using display() function which takes two arguments.
Explain Memory Allocation in C/C++ ?
Can you overload the operator+ for short integers?
What is an adjust field format flag?
Can we specify variable field width in a scanf() format string? If possible how?
Describe linked list using C++ with an example.