• Data Structure Reference

• Other Reference

# Data Structure MCQ - Matrix

This section focuses on the "Matrix" in Data Structure. These Multiple Choice Questions (MCQ) should be practiced to improve the Data Structure skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.

1. What is the order of a matrix?

A. number of rows multiplied number of columns
B. number of columns multiplied number of rows
C. number of rows multiplied number of rows
D. number of columns multiplied number of columns

2. How do you allocate a matrix using a single pointer in C? (M and N are the number of rows and columns respectively)

A. int *arr = malloc(M * N * sizeof(int));
B. int *arr = (int *)malloc(M * N * sizeof(int));
C. int *arr = (int *)malloc(M + N * sizeof(int));
D. int *arr = (int *)malloc(M * N * sizeof(arr));

3.Which of the following don’t use matrices?

A. In solving linear equations
B. Image processing
C. Graph theory
D. Sorting numbers

4. 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

5. What is the relation between Sparsity and Density of a matrix?

A. Sparsity = 1 – Density
B. Sparsity = 1 + Density
C. Sparsity = Density*Total number of elements
D. Sparsity = Density/Total number of elements

6. Who coined the term Matrix?

A. Harry Markowitz
B. James Sylvester
C. Chris Messina
D. Arthur Cayley

7. Who coined the term Sparse Matrix?

A. Harry Markowitz
B. James Sylvester
C. Chris Messina
D. Arthur Cayley

8.Which of the following is not the method to represent Sparse Matrix?

A. Dictionary of Keys
C. Array
D. Heap

9. Which one of the following is a Special Sparse Matrix?

A. Band Matrix
B. Skew Matrix
C. Null matrix
D. Unit matrix

10. Which of the following is the way to represent Sparse Matrix?

A. Arra
C. Both A and B
D. None of the above