We have to write a program that multiplies matricies, and i showed her the code below and she told me it had to use pointer arthimatic and I have no clue how to make the switch. It is probably a simple procedure but C programming and I make nothing easy...
thanks if anyone can help.
Code:void matrix_mul( int *mat1, int *mat2, int *mat3 ) { int i,j,k; for ( i=0; i<9; i++) mat3[i]=0; for ( i=0; i<3; i++ ) for ( j=0; j<3; j++ ) for ( k=0; k<3; k++ ) mat3[i+3*j] += mat1[i+3*k] * mat2[k+3*j]; }