1. pointer to the function:
Declaration format: Data Type (* function pointer variable name) (List of function parameter identifiers)
The function pointer variable points to the function entry address, that is, the array name;
For example, char (* PF) (char *, INT );
This function pointer pf can point to a function whose type is char *, Int, and char.
2. pointer assignment to functionFormat:
Function pointer = function name;
3. function pointer call, Format:
(* Pointer name) (real parameter list)
Returns a pointer to a function. After a function is called, the returned value is a pointer function, which is a pointer function. It is defined as int * func (int x, int Y );
4. Command Line Parameters
Program Design Process:
(1) design a program. The main function has two parameters, one of which is an array of pointers to the command line and the other is the number of command line parameters.
the main function is in the form of int main (INT argc, char * argc []).
argc: Number of command line parameters (including commands). The argv value of the pointer array is automatically run during program execution.
(2) Compile the program. The. c file name of the main function is the command name.
(3) Compile the program.
(4) execute a program in the command line environment in the following format:
command line parameter 1 parameter 2 parameter 3 parameter 4... Parameter n (Press ENTER)