[C Language Core Series] Pointer functions and function pointers in C language

Often, when we mention pointer functions and function pointers, many people don't understand them. The following is a detailed introduction to the pointer functions and function pointers in the C language.

Pointer function

When a function declares that its return value is a pointer, it actually returns an address to the calling function for use in expressions that require a pointer or address.

format:

类型说明符 * 函数名(参数)  

Since what is returned is an address, the type specifier is generally int.

In the C language, a function is also a type, and a pointer to the function can be defined. We know that the memory unit of the pointer variable stores an address value, and the function pointer stores the entry address of the function

Guess you like

Origin blog.csdn.net/weixin_54707168/article/details/114968954