git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@11325 626c5289-ae23-0410-ae9c-e8d60b6d4f22
16 lines
241 B
C
16 lines
241 B
C
/* 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;
|
|
}
|