Computer Science, asked by Rajuchakma2671, 11 months ago

What is the meaning of function overloading.

Answers

Answered by pkstar
0
Function overloading (also method overloading) is a programming concept that allows programmers todefine two or more functions with the same name and in the same scope. Each function has a unique signature (or header), which is derived from:function/procedure name. number of arguments. arguments' type.

Bhoomicharu: to whom
Bhoomicharu: okk
Bhoomicharu: carry on
Bhoomicharu: sry to disturb u
Bhoomicharu: hm
Answered by lovingheart
0

Functions having the same name but different arguments is termed as “function overloading”.

Explanation:

For example you want to add some values, sometimes you want to add two values, sometimes three values, then you can opt for function overloading.

void sum(int x, int y)

{

printf(“%d”, x + y);

}

void sum(int x, int y, int z)

{

printf(“%d”, x + y + z);

}

You can differ by number of argument or same number of argument with different type.

Similar questions