Home | History | Annotate | Download | only in tests
      1 
      2 #include <stdio.h>
      3 #include <stdlib.h>
      4 
      5 __inline__
      6 static int addemup ( int* arr )
      7 {
      8    int i, j = 0;
      9    for (i = 0; i <= 10; i++)
     10       j += arr[i];
     11    return j;
     12 }
     13 
     14 int main ( void )
     15 {
     16    int sum;
     17    int* a = calloc(10, sizeof(int));
     18    sum = addemup(a);
     19    printf("sum is %d\n", sum);
     20    return 0;
     21 }
     22