C language function pointer definitions and usage

Definition Format:

The type of function return value (* function pointer name) (parameter list);

Example:

int (*p)(int, int);

Functions can be understood as a first address, so we can direct assignment.

int add(int a,int b){
	.....
}

int (*p)(int, int) = add;

Guess you like

Origin blog.csdn.net/u013594490/article/details/93730373