| 13 | } |
| 14 | |
| 15 | int main() |
| 16 | { |
| 17 | int mat1[2][3] = {{11,12,13}, {14,15,16}}; |
| 18 | |
| 19 | int rows = 5; |
| 20 | int cols = 4; |
| 21 | //float mat2[rows][cols]; //uninitialized array |
| 22 | float mat2[rows][4]; //uninitialized array |
| 23 | |
| 24 | //init_2d_array(mat2, rows, cols); |
| 25 | |
| 26 | for (int r = 0; r < rows; r++) |
| 27 | for(int c = 0; c < cols; c++) |
| 28 | mat2[r][c] = r * c; |
| 29 | |
| 30 | |
| 31 | for (int r = 0; r < rows; r++) |
| 32 | { |
| 33 | for(int c = 0; c < cols; c++) |
| 34 | cout << mat2[r][c] << " "; |
| 35 | cout << endl; |
| 36 | } |
| 37 | return 0; |
| 38 | } |
nothing calls this directly
no outgoing calls
no test coverage detected