Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 58f5a40828161dc688bc640be9c7bd55 > files > 743

swig-1.3.11-4mdk.ppc.rpm

/* File : example.c */

int do_op(int a, int b, int (*op)(int,int)) {
  return (*op)(a,b);
}

int add(int a, int b) {
  return a+b;
}

int sub(int a, int b) {
  return a-b;
}

int mul(int a, int b) {
  return a*b;
}

int (*funcvar)(int,int) = add;