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 |
Program to find the sum of digits of a given number until the sum becomes a single digit
What is the purpose of main() function?
Differentiate between null and void pointers.
Explain what are the different file extensions involved when programming in c?
what is computer
How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
How do you define CONSTANT in C?
What is a pragma?
difference between ordinary variable and pointer in C?
Who is the founder of c language?
write a c program in such a way that if we enter the today date the output should be next day's date.
What are the types of data files?