Sail E0 Webinar
Question
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);
Options:
A .  Normal of a matrix
B .  Trace of a matrix
C .  Square of a matrix
D .  Transpose of a matrix
Answer: Option B


trace of a matrix is the sum of the principal diagonal elements.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers