Analyze the following code: After the loop, the last column of matrix 10, 10, 10, 10, 10. After the loop, the last row of matrix 10, 10, 10, 10, 10. After the loop, the last row of matrix 0, 0, 0, 0, 0. After the loop, the last row of matrix 0, 0, 0, 0, 10. A syntax error, because column is not defined.

Respuesta :

Answer:

given below

Explanation:

last column of matrix 10, 10, 10, 10, 10

int col = 10;

int [][] = new matrix [5][5];

for ( col = 0 ; col < matrix[4].length; col ++)

[col]=10;

int row = 10;

int [][] = new matrix [5][5];

for ( row = 0 ; row < matrix[4].length; row ++)

[row]=10;

or

int v = matrix [0][0];

for ( int i = 0 ;i< matrix .length;i++)

for ( int j=0;j<matrix.length;j++)

if (

if(v<matrix[i][j])

v=matrix[i][j];

return v;

or

loop, the last row of matrix 0, 0, 0, 0,

int row = 0;

int [][] = new matrix [5][5];

for ( row = 0 ; row < matrix[4].length; row ++)

int col= 0;

int [][] = new matrix [5][5];

for ( row = 0 ; col < matrix[4].length; col ++)

int col;

int [][] = new matrix [5][5];

for ( row = 0 ; col < matrix[4].length; col ++)

A syntax error, because column is not defined.