#include <stdio.h>
void
addarrays (int a1[], int a2[], int a3[], int n)
{
int i;
for (i=0; i<n; ++i)
a3[i] = a1[i] + a2[i];
}
int
main (void)
{
int x[] = {1,2,3,4}, i;
int y[] = {10,20,30,40};
int z[4];
addarrays (x, y, z, 4);
for (i=0; i<4; ++i)
printf ("%3d", x[i]);
printf ("\n + \n");
for (i=0; i<4; ++i)
printf ("%3d", y[i]);
printf ("\n-------------\n");
for (i=0; i<4; ++i)
printf ("%3d", z[i]);
return (0);
}