199k views
5 votes
. Two or more functions may have the same name, as long as their _________ are different.

User Punov
by
6.6k points

1 Answer

1 vote

Answer:

Number of parameters.

Step-by-step explanation:

The function is a block of the statement which performs the special task.

Syntax:

type name(parameter_1,parameter_2,...){

statement

}

we can define any number of function in the code and also with the name as well.

But when we define the function with same name the number of parameter define in both function must be different.

for example:

1. int print(int a){

statement;

}

2. int print(int a, int b){

statement;

}

first has one parameter and second has two parameters.

Both are valid in the code.

User Karlin
by
7.9k points