different between overloading and overriding

Answers were Sorted based on User's Feedback



different between overloading and overriding..

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

different between overloading and overriding..

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

different between overloading and overriding..

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

Post New Answer

More C Interview Questions

what do you mean by inline function in C?

0 Answers   IBS, TCS,


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'

2 Answers  


how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n");

9 Answers   TCS,


How can I do serial ("comm") port I/O?

0 Answers   Celstream,


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.

5 Answers   CCEM, TCS,






What are the types of data structures in c?

0 Answers  


what does static variable mean?

0 Answers   TCS,


What is use of bit field?

0 Answers  


What is wrong with this code?

0 Answers  


Do you know what are the properties of union in c?

0 Answers  


Explain how are portions of a program disabled in demo versions?

0 Answers  


code for concatination of 2 strings with out using library functions?

3 Answers  


Categories