#include
int add(int *x, int *y, int *z, int *sum)
{
int i=0;
for(i = 0; i < 3; i++)
{
sum[i] = x[i]+y[i]+z[i];
}
return sum;
}
int main(int argc, char ** argv)
{
int a[3] = {1,2,3};
int b[3] = {1,2,3};
int c[3] = {1,2,3};
int d[3];
int t,j;
t = add(a,b,c,d);
for(j = 0; j<3; j++)
{
printf("%d ",d[j]);
}
return 0;
}