res[ ][ ]= for( = <res_cols; ++res[ ][ +mat [ ][kmat [ ][ ]printf("\ the elements of the product matrix are ")for( = ; <res_rows; ++printf("\ ")for( = ; <res_cols; ++printf("\ % ",res[ ][ ])return output enter the number of rows in the first matrix enter the number of columns in the first matrix enter the number of rows in the second matrix enter the number of columns in the second matrix enter the elements of the first matrix enter the elements of the second matrix the elements of the product matrix are passing two-dimensional arrays to functions there are three ways of passing two-dimensional array to function firstwe can pass individual elements of the array this is exactly the same as passing an element of one-dimensional array secondwe can pass single row of the two-dimensional array this is equivalent to passing the entire one-dimensional array to function that has already been discussed in previous section thirdwe can pass the entire two-dimensional array to the function figure shows the three ways of using two-dimensional arrays for inter-functon communication array for interfunction communication passing individual elements passing row passing the entire arrary figure arrays for inter-function communication passing row row of two-dimensional array can be passed by indexing the array name with the row number look at fig which illustrates how single row of two-dimensional array can be passed to the called function