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:

    Every boy was supposed to come into the world equipped with a father whose prime function was to be our father and show us how to be men. He can escape us, but we can never escape him. Present or absent, dead or alive, real or imagined, our father is the main man in our masculinity.
    Frank Pittman (20th century)