Formal parameters: All called "formal arguments" are parameters that are used when defining function names and body functions in order to receive the arguments that call the function Shishung.
Arguments: All called "actual arguments" are arguments that pass a function on the call.
The types of formal parameters and arguments must be identical or conform to the implied conversion rules.
When a parameter and argument are not pointer types, when the function is run, the parameters and the actual
The arguments are different variables, they are in different positions in memory, the shape arguments real
The contents of the argument are copied, and the parameters are released at the end of the function run.
The actual argument content does not change.
And if the function's argument is a pointer-type variable, the procedure for calling the function
, a function is the address of an argument, which is also used inside the function body.
The address of an argument, that is, the argument itself. So inside the function body
You can change the value of an argument.
To give a very simple example: int f (int b)/*/b is a parameter */
{return B;}
Main ()
{int a = 1;
printf ("%d", f (a)); /* A is an actual parameter */
}
And one of the stupidest ways is that the function defined in the letter is called "argument", a function outside the function, "parameter."