3 - Matrix Print
Write a void function called matrixPrint that has a single two-dimensional array parameter. The function should print the contents of its parameter. The size of its parameter should be specified with the defined constants ROW and COLUMN that represent the values 3 and 4 respectively. The function prototype is shown below.
void matrixPrint(int m[ROW][COLUMN]);
The output should be printed neatly in rows and columns, with a field width of 4.
Code:
If m1 is defined as: int m1[ROW][COLUMN] = { {1,2,3,4}, {2,3,4,5}, {3,4,5,6} };
Then matrixPrint(m1); should display the output shown below.
1 2 3 4
2 3 4 5
3 4 5 6
Code:
#include "stdio.h"
const int ROW = 3;
const int COLUMN = 4;
int main()
{
// Matrix Addition Test----------------------------
int m1[ROW][COLUMN];
int m2[ROW][COLUMN];
int m3[ROW][COLUMN];
return 0;
}