1
typedef int (*reducer_t)(int,int); int reduce(int* arr,int n,reducer_t f){ int r=arr[0]; for(int i=1;i<n;i++) r=f(r,arr[i]); return r; }