return (a, b, c, ... , n)
The statements a
, b
, c
are separated with comma operators and the expression evaluates to the rightmost operand n
. So the syntax is correct, but does not return multiple values.
To return multiple values:
- Put the variables you want to return in a structure and return it.
- Or make an array of multiple variables (dynamically allocated) and return the base address