| Parentheses operators ('(...)')

Previous | Punctuators | Next

Parentheses operators do the following:

- group expressions (when necessary to change precedence);
- isolate conditional expressions;
- indicate function calls and function parameters.

Note that parentheses are also the part of the TypeCast operator.
When used as function-call operators, parentheses use the following syntax:

    expr (arg-expression-list)

This is a call to the function given by the expr, which can be either the function name, or an expression which evaluates to a pointer-to-function type. In the second case, the function call is in fact translated to

    (* expr) (arg-expression-list)

arg-expression-list is a comma-delimited list of expressions of any type representing the actual (or real) function arguments. The value of the function call expression, if it has a value, is determined by the `return` statement in the function definition.
arg-expression-list may even be empty, which is necessary when you need to call an argument-less function:

    expr ()

Note that every function name, if used alone (without the parentheses operator), is automatically interpreted as a pointer to the function.
When used as a punctuator, parentheses are used for creating function types (see asterisk for more info).