554 Contributors: 12 Friday, April 14, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial:
Roadmap: roadmap

Function Pointers


Function pointers are pointers that point to functions instead of data types. They can be used to allow variability in the function that is to be called, at run-time.


  • returnType (*name)(parameters)

  • typedef returnType (*name)(parameters)

  • typedef returnType Name(parameters);
    Name *name;

  • typedef returnType Name(parameters);
    typedef Name *NamePtr;

Related Examples