0
What is function overloading?
5 odpowiedzi
+ 5
Functions having same name and different signature implement the concept of function overloading.
void func1(int a) ;
void func1(char a) ;
Function signature means number of arguments and type of arguments.
void area(int a) ;//for square
void area(int a, int b) ;//for rectangle
void area(float r) ;//for circle
int a, b;float r;
area(a) calls first area function
area(a, b) calls second function
area(r) calls third area function
+ 1
a function has a same name with different argument or function definitions
int add(int,int){
}
int add(int,int,int){
}
+ 1
a function has a same name with different argument or function definitions
int add(int,int){
}
int add(int,int,int){
}
0
function overloading is the imp concept of c++ in which we have same function name with different parameter or different type of parameters..or different numbers of parameter...
0
using same function name with different number and types of parameters is called function overloading