When a source program consists of multiple source files, the function is divided into internal functions and external functions, depending on whether the function can be called by functions in other source files.
1 intrinsic functions (also called static functions)
If a function defined in a source file can only be called by a function in this file, but not by a function in the other file of the same program, this function is called an intrinsic function.
Define an intrinsic function by simply adding a "static" keyword before the function type:
static function type function name (function parameter table)
The keyword "static", translated into Chinese, is "still", so the internal function is also called the static function. But the meaning of "static" here does not mean storage, but the scope of the function is limited to this file.
The advantage of using intrinsic functions is that when different people write different functions, they don't have to worry about the functions they define, or whether they have the same name as the functions in other files, because the same name doesn't matter.
2 external functions
Definition of an external function: when defining a function, if the keyword "static" is not added, or the keyword "extern", it means that the function is an external function, which is our most commonly used form of function.
Static functions of C language