Hey, can anyone solve this in array in c language? Multiplication of two matrix.
Write a function solution that accepts two M1 x N1 and M2 x N2 size matrices (A1 and A2 respectively) and four integers M1, N1, M2 and N2. The function should return multiplication of these matrices. If a multiplication is not possible return 1 x1 matrix with value -1 Input 2 3 551 234 3 1 3 4 Where, ⢠First line of input represents the number of rows of first Matrix. (M1) ⢠Second line of input represents the number of columns of first Matrix. (N1). ⢠Third line onwards contains first matrix elements of 1st row and so on. ⢠Fifth (Value of M1 + 3) line of input represents the number of rows of a second Matrix. (M2) ⢠Sixth (Value of M1 + 4) line of input represents the number of columns of a second Matrix. (N2). ⢠Seventh (Value of M1 + 5) line onwards contains second matrix elements of 1st row and so on Output 29 29 Here for the given 2 x 3 and 3 x1 matrices, 551 234 and 2 3 4 the multiplication will be 5*2 + 5*3 + 1*4 = 29 2*2 + 3*3 + 4*4 = 29 Hence final 2 x1 matrix will be 29 29