4 Complicated one that should defeat just reading , to find
5 the number of arguments expected in the function pointer.
6 extern void do(int (*op)(int (*i)(double, double), int j));
10 typedef double (*DistFun)(double* data, int r, int c, int i, int j, void *xdata);
12 void distance(double *data, int *dim, DistFun fun, double *output) {
15 typedef int (*Operator)(int i,int j);
17 int do_op(int a, int b, int (*op)(int,int)) {
21 int add(int a, int b) {
25 int subtract(int a, int b) {
29 int multiply(int a, int b) {
41 struct MyStruct { int i; };
42 typedef struct MyStruct * MyStructPtr;
44 MyStructPtr mystructptr() {
48 typedef int * Integer;
50 int (*funcvar)(int,int) = add;
51 int * (*funcvar2)() = nowt;
52 int * (*funcvar3)(void) = nowt2;
53 Integer (*funcvar4)() = nowt;
54 MyStructPtr (*funcvar5)() = mystructptr;
59 void (*pfunc2)(int, double);