#include using namespace std; double add(double x, double y) { return x+y; } double subtract(double x, double y) { return x-y; } double multiply(double x, double y) { return x*y; } typedef double(*func_ptr)(double,double); int main() { const int N = 3; func_ptr x[N] = {add, subtract, multiply}; string fname[N] = {"add", "subtract", "multiply"}; for(int i=0; i < N; i++) { cout << "now using function " << fname[i] << endl ; cout << x[i](10,2) << endl; } return 0; }