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

View Answer


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));

View Answer


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

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

View Answer


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

View Answer


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

View Answer


6. Who coined the term Matrix?

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

View Answer


7. Who coined the term Sparse Matrix?

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

View Answer


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

A. Dictionary of Keys
B. Linked List
C. Array
D. Heap

View Answer


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

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

View Answer


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

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

View Answer






Discussion



* You must be logged in to add comment.