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

Program to find the sum of digits of a given number until the sum becomes a single digit

8 Answers   InterGraph,


What is the purpose of main() function?

0 Answers  


Differentiate between null and void pointers.

0 Answers   TCS,


Explain what are the different file extensions involved when programming in c?

0 Answers  


what is computer

4 Answers  






How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

2 Answers  


How do you define CONSTANT in C?

0 Answers   ADP,


What is a pragma?

0 Answers  


difference between ordinary variable and pointer in C?

2 Answers  


Who is the founder of c language?

0 Answers  


write a c program in such a way that if we enter the today date the output should be next day's date.

0 Answers  


What are the types of data files?

0 Answers  


Categories