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 |
what do you mean by inline function in C?
a=(1,2,3); b=1,2,3; c=1,(2,3); d=(1,2),3; what's the value of 'a','b','c','d'
how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n");
How can I do serial ("comm") port I/O?
What is false about the following A compound statement is a.A set of simple statments b.Demarcated on either side by curly brackets c.Can be used in place of simple statement d.A C function is not a compound statement.
What are the types of data structures in c?
what does static variable mean?
What is use of bit field?
What is wrong with this code?
Do you know what are the properties of union in c?
Explain how are portions of a program disabled in demo versions?
code for concatination of 2 strings with out using library functions?