C-Type-Function-Pointers

Declaration

Description

typedef int (*fptr)(int, int); fptr fp;

fp is a function pointer which can hold the address of a function which takes two integers as a parameter and returns an integer

typedef int fptr(int, int); fptr *fp;

fp is a function pointer which can hold the address of a function which takes two integers as a parameter and returns an integer

typedef int (*fptr)(int, int); fptr fp[10];

fp is an array of function pointers where each function pointer can hold the address of a function which takes two integers as a parameter and returns an integer

typedef int fptr(int, int); fptr *fp[10];

fp is an array of function pointers where each function pointer can hold the address of a function which takes two integers as a parameter and returns an integer

typdef int (*fptr)(int, int); fptr fun(fptr)

fun is a function which takes a function pointer as an arguement and returns a function pointer

typdef int fptr(int, int); fptr *fun(fptr *)

fun is a function which takes a function pointer as an arguement and returns a function pointer