Write a program to implement pointer to function.
#include <stdio.h>
int sum(int x, int y)
{
return x+y;
}
int main()
{
int (*fp)(int, int);
fp = sum;
int s = fp(10, 15);
printf("Sum is %d", s);
return 0;
}
Output
Sum is 25