The user has to firstly enter the size of the matrices and for matrix multiplication to occur the size of matrix should be as follows, first (m, n) & second (n, p).
The size of the output matrix would be out (m, p).
The main loop to multiply the matrices would be:
for ( c = 0 ; c < m ; c++ )
for ( d = 0 ; d < q ; d++ )
for ( k = 0 ; k < p ; k++ )
sum = sum + first[c][k]*second[k][d];
multiply[c][d] = sum;
Sum = 0;
Please see the video for more details