/* Matrix multiplication - Develop a function that takes as arguments 3 matrices a , b , c and 3 integer variables l,m,n. Calculate product of a and b and store the result in c. Also write a main routine which will test whether the input matrices a and b are conformal to multiplication - May 2013 */ #include #include void read(int x[ ][10], int nr, int nc) ; void multiply(int a[ ][10], int b[ ][10], int c[ ][10], int l, int m, int n) ; void show(int y[ ][10], int nr, int nc) ; void main() { int a[10][10], b[10][10], c[10][10], nra, nca, nrb, ncb ; clrscr(); printf("Enter the number of rows and columns of first matrix: "); scanf("%d %d", &nra, &nca) ; printf("Enter the number of rows and columns of second matrix: "); scanf("%d %d", &nrb, &ncb) ; if(nca==nrb) { printf("Enter elements of first matrix row-wise: \n"); read(a,nra,nca); printf("Enter elements of second matrix row-wise: \n"); read(b,nrb,ncb); multiply(a,b,c,nra,nca,ncb); printf("Result of matrix multiplication is: \n"); show(c,nra,ncb); } else printf("Two given Matrices do not conform to multiplication"); getch(); } void read(int x[ ][10], int nr, int nc) { int r, c ; for(r=0 ; r