C LanguageFunction 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;