Stats

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

Function Pointers

Introduction

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.

Syntax

  • returnType (*name)(parameters)

  • typedef returnType (*name)(parameters)

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

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

Related Examples