What is a Function Pointer ?
Function Pointers are pointers, i.e. variables, which point to the address of a function. generally most of the text books give very brief tutorial for the concept of function pointer. it’s syntax is somewhat complicated. here is an attempt to simplify the things.
Consider below example:

################################
output
################################
8 8

Lesson to learn from above example:
1) pointer is a variable.
2) pointer stores the address of another variable.
3) Like in above example a is variable which is assigned 8 and p is an integer pointer which strores the address of a.
4) to print the value at the pointer, * operator is used like in printf(“%x\t%d\n”,a,*p); statement.

The above example is very basic. so as p is called integer pointer, same way a pointer which points to an address of function called function pointer.

Syntax of declaration:

Let us consider a plan function in C:

if we want to declare a function pointer for above function int add(int n,int m) then the syntax will be
int (*fp)(int,int);
look at another example with function pointer declaration with “How to Use function pointer”

How to Pass a Function Pointer as an Argument ?
consider below example.

For more exercise predict the output of below program.