My Report (&Account)

Sparse Matrix Test


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

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

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

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

4. What is the order of a matrix?

5. What does the following piece of code do?

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

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

7. If column-major order is used, how is the following matrix stored in memory?
a b c
d e f
g h i

8. Which of the following is an advantage of matrices?

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

10. If row-major order is used, how is the following matrix stored in memory?
a b c
d e f
g h i


 

Start practicing “1000 MCQs on Data Structure”, and once you are ready, you can take tests on all topics by attempting our “Data Structure Test Series”.

advertisement
advertisement
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.