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 setw manipulator in c++?
What is the difference between reference and pointer?
Describe delete operator?
What is the use of data hiding?
What are the various compound assignment operators in c++?
Why we use #include iostream in c++?
Which format specifier is used for printing a pointer value?
Can class objects be passed as function arguments?
Which operator cannot be overloaded c++?
What are the advantages of using a pointer? Define the operators that can be used with a pointer.
What parameter does the constructor to an ofstream object take?
Should I learn c or c++ first?
Why do we use vector in c++?
What is ostream in c++?
Write about a nested class and mention its use?