Syntax:
function_name(e1, e2, ..., eN)
Arguments that are not arrays (actual parameters) are transferred by value, that is, each expression e1, ..., eN is calculated and the parameter is transferred to the function. Arrays are transferred "by pointer", as shown in the example:
void func(char s[])
{
s[0] = 2;
}
void main()
{
char array[3];
func(array);
}
The func function modifies the value of element0 of the "array" array declared in the main function, and not of its duplicate.
Pointers to functions (like all other pointers) are not supported.
|