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 |
plz answer..... a program that reads non-negative integer and computes and prints its factorial
please help me.. how to write a code of this output?? "Enter range number:"10 1 is an odd number 2 is an even numbers 3 in an odd numbers 4 " to 10" "printing all odd numbers:" 1,3,5,7,9 "printing all even numbers:" 2,4,6,8,10 "sum of all odd numbers:25 "sum of all even numbers:30 using a C Programming ARRAY pleas pleas help.. its my project ..please :(
a<<1 is equivalent to a) multiplying by 2 b) dividing by 2 c) adding 2 d)none of the above
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
what is the value of b if a=5; b=++a + ++a
31 Answers Infosys, TCS, Tech Mahindra,
Is there any restriction in how many arguments printf or scanf function can take? in which file in my c++ compiler i can see the code for implementation of these two functions??
What is an array in c?
How can you allocate arrays or structures bigger than 64K?
Write a c program to print the even numbers followed by odd numbers in an array without using additional array
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
about c language
how can i make a program with this kind of output.. Enter a number: 5 0 01 012 0123 01234 012345 01234 0123 012 01 0