Data Structure Questions and Answers-Matrix

YOU CAN DOWNLOAD 200+ SUBJECTS PDF BOOK FOR COMPETITIVE EXAMINATIONS

CLICK HERE TO DOWNLOAD

Data Structure Questions and Answers-Matrix

Question 6 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
If row-major order is used, how is the following matrix stored in memory?

a b c

d e f

g h i

A
ihgfedcba
B
abcdefghi
C
cfibehadg
D
adgbehcfi
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 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
If column-major order is used, how is the following matrix stored in memory?

a b c

d e f

g h i

A
ihgfedcba
B
abcdefghi
C
cfibehadg
D
adgbehcfi
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 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
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 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
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 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
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
Question 10 Explanation: 
Any square matrix when multiplied with its inverse gives the identity matrix. Note that non square matrices are not invertible.

There are 10 questions to complete.