# Data Structure Questions and Answers-Matrix

## Click on any option to know the CORRECT ANSWERS

 Question 6
If row-major order is used, how is the following matrix stored in memory?

a b c

d e f

g h i

Question 6 Explanation:
It starts with the first element and continues in the same row until the end of row is reached and then proceeds with the next row. C follows row-major order.

 Question 7
If column-major order is used, how is the following matrix stored in memory?

a b c

d e f

g h i

Question 7 Explanation:
It starts with the first element and continues in the same column until the end of column is reached and then proceeds with the next column. Fortran follows column-major order.

 Question 8
Which of the following are the uses of matrices?
 A In solving linear equations B Image processing C Graph theory D All of the mentioned

Question 8 Explanation:
Solving linear equations is a separate field in Mathematics involving matrices, Image processing stores the pixels in the form of matrices, and the graphs are represented with the help of matrices to indicate the nodes and edges.

 Question 9
What is the disadvantage of matrices?
 A Internal complexity B Searching through a matrix is complex C Not space efficient D All of the mentioned

Question 9 Explanation:
Time complexity of a matrix is O(n2) and sometimes the internal organization becomes tedious.

 Question 10
Matrix A when multiplied with Matrix C gives the Identity matrix I, what is C?
 A Identity matrix B Inverse of A C Square of A D Transpose of A