What Does The Following Piece Of Code Dop Pre Langjava #355
What does the following piece of code do?</p> <pre><code class="language-java"> 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);</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs121 Data Structures and Algorithms. It can also be found in gs gs121 Array Types - Matrix - Quiz No.1.
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);
Normal of a matrix
Trace of a matrix
Square of a matrix
Transpose of a matrix
Similar question(s) are as followings:
Online Quizzes of gs121 Data Structures and Algorithms
Binary Trees - Binary Search Tree - Quiz No.1
gs gs121 Data Structures and Algorithms
Online Quizzes
Binary Trees - Binary Search Tree - Quiz No.2
gs gs121 Data Structures and Algorithms
Online Quizzes
Binary Trees - Preorder Traversal - Quiz No.1
gs gs121 Data Structures and Algorithms
Online Quizzes