0
What do you mean by call?
3 ответов
+ 3
Calling is the term given when we "call" a function. Essentially, calling just means "run that function".
E.g.
int sum(int a, int b)
{
return a + b;
}
int main()
{
cout << sum(5, 10);
return 0;
}
Here we are calling the "sum" function, and passing two integers through so that it can return the sum.
+ 6
Calling a function is using it, as opposed to defining it.
In Cohen's example, this:
int sum(int a, int b)
{
return a + b;
}
is a function definition, and this:
sum(5, 10)
is a call to it with the arguments 5 and 10.
0
calling a function simply means using the function.