C Data Types - Function Pointers

Function Pointers

Function pointers allow referencing functions with a particular signature. For example, to store the address of the standard function abs in the variable my_int_f:

int (*my_int_f)(int) = abs;

Function pointers are invoked by name just like normal function calls. Function pointers are separate from pointers and void pointers.

Read more about this topic:  C Data Types

Famous quotes containing the word function:

    It is the function of vice to keep virtue within reasonable bounds.
    Samuel Butler (1835–1902)