Question: / * main.c * / #include #include vector.h int x [ 2 ] = { 1 , 2 } ; int y [ 2

/* main.c */
#include
#include "vector.h"
int x[2]={1,2};
int y[2]={3,4};
int z[2];
int main()
{
addvec(x, y, z,2);
printf("z=[%d %d]
", z[0], z[1]);
return 0;
}
/* addvec.c */
void addvec (int *x, int *y, int *z, int n)
{
int i;
for(i=0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!