Learn basic concept of c , c++ and python programming in regularcodes.com

Spread the post

Program for matrix multiplication in c

Given two matrix A and B. Perform multiplication operation of A X B. view example.

Matrix B 1 1 1 2 2 2 3 3 3 Matrix B 1 1 1 2 2 2 3 3 3 Matrix [ A X B ] 6 6 6 12 12 12 18 18 18

Function are perform matrix multiplication

C Program for matrix multiplication.

Output


Stack Areamainmatrix_1 [3,3] [0][0] 1[0][1] 1[0][2] 1[1][0] 2[1][1] 2[1][2] 2[2][0] 3[2][1] 3[2][2] 3matrix_2 [3,3] [0][0] 1[0][1] 1[0][2] 1[1][0] 2[1][1] 2[1][2] 2[2][0] 3[2][1] 3[2][2] 3result [3,3] [0][0] 6[0][1] 6[0][2] 6[1][0] 12[1][1] 12[1][2] 12[2][0] 18[2][1] 18[2][2] 18matrices_mulcolumn (int) =3k (int) =3matrix_1(pointer)matrix_2(pointer)result(pointer)row (int) =3

Code execution process.

Spread the post

Recommended Posts: