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

Write a C program to find the smallest of three integers, without using any of the comparision operators.

7 Answers   TCS,


What is identifier in c?

0 Answers  


What is a far pointer in c?

0 Answers  


write a program which counts a product of array elements lower than 10.

1 Answers  


What is bss in c?

0 Answers  


Which driver is a pure java driver

0 Answers   Vertex,


What is the difference between %d and %i?

0 Answers  


there is two conditions , 1. while using for loop for printing 1 to 50 no's simulteneous 2. while using printf functios for printing 1 to 50 no's simulteneous with or without using variables who will take more time for compiling and execution? explain in details with reason?

1 Answers  


Can you apply link and association interchangeably?

0 Answers   InterGraph,


Which sorting algorithm is the best?

1 Answers  


What does do in c?

0 Answers  


Why is sprintf unsafe?

0 Answers  


Categories