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 |
Which of the following sorts is quickest when sorting the following set: 1 2 3 5 4 1) Quick Sort 2) Bubble Sort 3) Merge Sort
How does placing some code lines between the comment symbol help in debugging the code?
what is the purpose of the code, and is there any problem with it. bool f( uint n ) { return (n & (n-1)) == 0; }
What is data structure in c and its types?
const char * char * const What is the differnce between the above tow?.
Where we use clrscr in c?
what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"); } why it gives the value of third variable.
what is a function pointer and how all to declare ,define and implement it ???
difference between c and c++?
What does static mean in c?
Can a function argument have default value?
inline function is there in c language?