C-04 function,-04 Function
1. Parameters
Parameter notes
1. Formal parameters: when defining a function, the parameters following the function name are referred to as form parameters.
2. Actual parameters: Specific data passed in by calling the function, referred to as real parameters
3. The number of real parameters must be equal to the number of shape parameters.
4. The function body cannot define variables with the same parameters.
5. If the basic data type is used as the function parameter, it is purely a value transfer. Modifying the value of the internal function parameter does not affect the value of the external parameter.
6. A function can have no shape parameters or an unlimited number of shape parameters.
2. Return Value
Function of return:
1> exit the Function
2> return a specific value to the function caller.
Notes on returned values
1> void indicates no return value
2> If the return value type is not explicitly stated, int type is returned by default.
3> even if the return value type is explicitly declared, no value is returned.
By default, the C language does not allow two functions to have the same name.
3. # include <file name. Extension> system's "file name. Extension" Custom
The include statement copies the function declaration to prevent warnings during compilation.
Cc. File Name. o links the definition of the system library function when linking.