Function call operator ( )

A function call is an expression containing the function name followed by the function call operator, (). If the function has been defined to receive parameters, the values that are to be sent into the function are listed inside the parentheses of the function call operator. The argument list can contain any number of expressions separated by commas. It can also be empty.

The type of a function call expression is the return type of the function. This type can either be a complete type, a reference type, or the type void. C onlyA function call expression is always an rvalue. C++ A function call is an lvalue if and only if the type of the function is a reference.

Here are some examples of the function call operator:

overdue(account, date, amount)
notify(name, date + 5)
report(error, time, date, ++num)

The order of evaluation for function call arguments is not specified. In the following example:

method(sample1, batch.process--, batch.process);

the argument batch.process-- might be evaluated last, causing the last two arguments to be passed with the same value.

Related information