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 |
yogesh patil in dell
struct node { int *a; char *b; char array[12]; }; struct node m,*n; assign the value in *a,*b,char array[12]
Why pointers are used?
the operator for exponencation is a.** b.^ c.% d.not available
What is #include stdio h?
how to find sum of digits in C?
What is the use of function in c?
program for following output using for loop? 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5
Write a program to check whether a number is prime or not using c?
how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?
What does the error 'Null Pointer Assignment' mean and what causes this error?
Explain the priority queues?