C examples for Pointer:Function Pointer
Declaring and using a pointer to a function.
#include <stdio.h> double square(double x); double (*ptr)(double x); int main( void ) { ptr = square;/* Initialize p to point to square(). */ printf("%f %f\n", square(6.6), ptr(6.6));/* Call square() two ways. */ return 0;// w w w . j a va 2 s . c om } double square(double x){ return x * x; }