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

Why is c called c not d or e?

0 Answers  


What is variable in c example?

0 Answers  


What is scanf () in c?

0 Answers  


write a program for 7*8 = 56 ? without using * multiply operator ? output = 56

6 Answers   Xavient,


What is RAM memory? and What is ROM?Who designed one is temparary and another is permanent?why they designed like that?By using far pointer which type data(whether hexadecimal)we can access?

1 Answers   Excel,






How to add two numbers with using function?

4 Answers  


What is macro?

5 Answers   IBM,


Can true be a variable name in c?

0 Answers  


#include<stdio.h> #include<conio.h> # define swap(a,b) temp=a; a=b; b=temp; void main( ) { int i, j, temp; i=5; j=10; temp=0; if( i > j) swap( i, j ); printf( "%d %d %d", i, j, temp); }

9 Answers   Burning Glass,


write a program fibonacci series and palindrome program in c

0 Answers   Aditi Placement Service,


what would be the output of the following program main() { int a[] = {1,2,3,4,5}; int *ptr = {a,a+1,a+2,a+3,a+4}; printf("%d %d %d %d",a,*ptr,**ptr,ptr); } }

1 Answers  


Differentiate abs() function from fabs() function.

0 Answers  


Categories