different between overloading and overriding
Answers were Sorted based on User's Feedback
Answer / rekha
Overriding - same method names with same arguments and same
return types associated in a class and its subclass.
Overloading - same method name with different arguments, may
or may not be same return type written in the same class itself.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / pugalarasu
Overloading:
Same function name but different arguments
Eg:
A(int i);
A(int i,float f);
Overriding:
refers to functions that have the same signature as a
virtual function in the base class:
class B {
virtual void V();
};
class D : public B {
viod V();
};
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / rakurakesh
Method overloading
done in same
class but method overridng done in
diff. Class here inheritance occure.
| Is This Answer Correct ? | 0 Yes | 1 No |
There are 8 billiard balls, and one of them is slightly heavier, but the only way to tell was by putting it on a weighing scale against another. What's the fewest number of times you'd have to use the scale to find the heavier ball?
What is the g value paradox?
In C, What is the #line used for?
wat is the meaning of c?
two variables are added answer is stored on not for third variable how it is possible?
plz let me know how to become a telecom protocol tester. thank you.
How can I use a preprocessorif expression to ?
Is it possible to use curly brackets ({}) to enclose single line code in c program?
What is the acronym for ansi?
Explain what are multidimensional arrays?
How macro execution is faster than function ?
What is static and volatile in c?