PageRenderTime 12ms CodeModel.GetById 9ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/php/pointer/example.c

#
C | 16 lines | 12 code | 3 blank | 1 comment | 0 complexity | d91f35818f774cb24fafb54ea4af518a MD5 | raw file
 1/* File : example.c */
 2
 3void add(double *x, double *y, double  *result) {
 4  *result = *x + *y;
 5}
 6
 7void sub(int *x, int *y, int *result) {
 8  *result = *x - *y;
 9}
10
11int divide(int n, int d, int *r) {
12   int q;
13   q = n/d;
14   *r = n - q*d;
15   return q;
16}