Question: Please identify and explain the error in the following C code. / * return y = Ax * / 1 . int * vector (

Please identify and explain the error in the following C code. /* return y = Ax */1. int *vector(int **A, int *x, int n){2. int *y = malloc(n * sizeof(int)); 3. int i, j; 4. for (i =0; i < n; i++)5. for (j =0; j < n; j++)6. y[i]+= A[i][j]* x[j]; 7. return y; 8.}

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!