Vidyalelo
Data Structure · Q68

Arrays in Data Structures

Programming · Data Structure · question 68

Q68

What does the following piece of code do? for(int i = 0; i < row; i++) for(int j = 0; j < column; j++) if(i == j) sum = sum + (array[i][j]); System.out.println(sum);

A.
Normal of a matrix
B.
Trace of a matrix
Answer
C.
Square of a matrix
D.
Transpose of a matrix

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board