1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* File : example.c */ void add(int *x, int *y, int *result) { *result = *x + *y; } void sub(int *x, int *y, int *result) { *result = *x - *y; } int divide(int n, int d, int *r) { int q; q = n/d; *r = n - q*d; return q; }