+ 3

What is function overloading?

6th Apr 2017, 1:40 PM
Fatihullah Noory
Fatihullah Noory - avatar
3 Answers
+ 8
You can have multiple definitions for the same function name in the same scope by varying function signature. You can not overload function declarations that differ only by return type. Right -> void sum (int,int); void sum (double,int); Wrong-> void sum (int,int); int sum (int,int);
6th Apr 2017, 1:44 PM
Pixie
Pixie - avatar
+ 3
functions with same name but by different return type and different signatures(different number of parameters)...
7th Apr 2017, 12:23 PM
Mohed
Mohed - avatar
0
tnx
6th Apr 2017, 1:46 PM
Fatihullah Noory
Fatihullah Noory - avatar