1.

What is the order of a matrix?

**Answer: Option 'A'**

**By definition, the order of a matrix is number of rows X number of columns, generally denoted by mXn(not compulsory).**

2.

Which of the following property does not hold for matrix multiplication?

**Answer: Option 'C'**

**Commutative**

3.

How do you allocate a matrix using a single pointer in C?(r and c are the number of rows and columns respectively)

**Answer: Option 'B'**

**int *arr = (int *)malloc(r * c * sizeof(int));
Total number of elements in the matrix will be r*c**

4.

Select the code snippet which performs matrix multiplication.(a and b are the two given matrices, resultant marix is c)

for(inti = 0; i < n; i++) {for(intj = 0; j < n; j++) {for(intk = 0; k < n; k++) { c[i][j] = c[i][j] + a[i][k] * b[k][j]; } } }

for(inti = 0; i < n; i++) {for(intj = 0; j < n; j++) {for(intk = 0; k < n; k++) { c[i][j] = c[i][j] * a[i][k] * b[k][j]; } } }

for(inti = 0; i < n; i++) {for(intj = 0; j < n; j++) {for(intk = 0; k < n; k++) { c[i][j] = c[i][j] + a[i][k] + b[k][j]; } } }

**Answer: Option 'A'**

**The corresponding elements from the row and column are multiplied and a cumulative sum is formed.**

5.

What does the following piece of code do?

for(inti = 0; i < row; i++) {for(intj = 0; j < column; j++) {if(i == j) sum = sum + (array[i][j]); } } System.out.println(sum);

**Answer: Option 'B'**

**trace of a matrix is the sum of the principal diagonal elements.**

6.

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

a b c

d e f

g h i

**Answer: Option 'B'**

**abcdefghi
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.**

7.

Which of the following are the uses of matrices?

**Answer: Option 'D'**

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

8.

What is the disadvantage of matrices?

**Answer: Option 'D'**

**time complexity of a matrix is O(n2) and sometimes the internal organization becomes tedious.**

9.

Matrix A when multiplied with Matrix C gives the Identity matrix I, what is C?

**Answer: Option 'B'**

**Any square matrix when multiplied with its inverse gives the identity matrix. Note that non square matrices are not invertible.**

- Threaded Binary Tree | | Data Structure MCQs
- Splay Tree | Data Structure MCQs
- Red Black Tree | Data Structure MCQs
- Weight Balanced Tree | Data Structure MCQs
- Cartesian Tree | Data Structure MCQs
- AVL Tree | Data Structure MCQs
- Binary Search Tree | Data Structure MCQs
- Binary Tree Properties | Data Structure MCQs
- Inorder Traversal | Data Structure MCQs
- Preorder Traversal | Data Structure MCQs
- Binary Trees using Linked Lists | Data Structure MCQs
- Binary Trees using Array | Data Structure MCQs
- Free List | Data Structure MCQs
- Xor Linked List | Data Structure MCQs
- Skip List | Data Structure MCQs
- Matrix | Data Structure MCQs
- Sparse Array | Data Structure MCQs
- Parallel Array | Data Structure MCQs
- Dynamic Array | Data Structure MCQs
- Bit Array | Data Structure MCQs
- Towers of Hanoi | Data Structure MCQs
- Decimal to Binary using Stacks | Data Structure MCQs
- Stack using Queues | Data Structure MCQs
- Double Ended Queue (Dequeue) | Data Structure MCQs
- Priority Queue | Data Structure MCQs
- Queue using Linked List | Data Structure MCQs
- Queue using Array | Data Structure MCQs
- Stack using Linked List | Data Structure MCQs
- Stack using Array | Data Structure MCQs
- Circular Linked List | Data Structure MCQs

- RRB NTPC and RRB Group D Free Model Papers in Tamil Telugu Hindi and English
- Current Affairs in Telugu - RRB NTPC and RRB Group D Model Papers in Telugu
- Arithmetic and Maths in Telugu MCQs - RRB NTPC and RRB Group D Model Papers in Telugu
- Biology MCQs - RRB NTPC and RRB Group D Model Papers in Telugu
- Reasoning Practice Tests in Telugu - RRB NTPC and RRB Group D Model Papers in Telugu
- Science and Technology MCQs - RRB NTPC and RRB Group D Model Papers in Telugu
- Chemistry MCQs in Telugu - RRB NTPC and RRB Group D Model Papers in Telugu
- Physics MCQs in Telugu - RRB NTPC and RRB Group D Model Papers in Telugu
- Indian Polity - Constitution & Administration in Telugu - RRB NTPC and RRB Group D Model Papers in Telugu
- Indian Geography in Telugu MCQs - RRB NTPC and RRB Group D Model Papers in Telugu
- Andhra Pradesh - Geography in Telugu - RRB NTPC and RRB Group D Model Papers in Telugu
- General Knowledge MCQs - RRB NTPC and RRB Group D Model Papers in Telugu
- General Studies in Telugu - APPSC TSPSC UPSC - MCQs
- Andhra Pradesh Economics Question and Answers - MCQs