C Program to Find the Sum of Each Row and Column of a MxN Matrix

This is a program C to find the sum of each row & each column of a MxN Matrix Problem Description This C Program finds the sum of each row & each column of a MxN matrix. The program accepts an MxN matrix. Then adds each row of the matrix and also adds each column … Read more

advertisement

C Program to Sort Rows and Columns of the Matrix

This is a C Program to sort rows of the matrix in ascending & columns in descending order. Problem Description This C Program sorts the rows of the matrix in ascending & columns in descending order. Problem Solution This program accepts matrix. Then sorts the row in an ascending order & the columns in descending … Read more

advertisement

Transpose of a Matrix in C

What is Transpose of a Matrix? The transpose of a matrix is found by interchanging its rows into columns or columns into rows. The transpose of the matrix is denoted by using the letter “T” in the superscript of the given matrix. For example, if “A” is the given matrix, then the transpose of the … Read more

advertisement

C Program to Find Normal and Trace of a Matrix

This is a program to find the trace & normal of a given matrix. Problem Description This C Program find the trace & normal of a given matrix. Here trace of the matrix is the sum of the elements of the main diagonal i.e the diagonal from the upper left to the lower right of … Read more

advertisement

C Program to Interchange Diagonals of Matrix

This is a program to accept a matrix of order MxN & interchange the diagonals. Problem Description This C Program accepts matrix of order MxN & interchange the diagonals. This program first accepts the matrix. Then exchange diagonals of the matrix. Problem Solution 1. Create a matrix of some order and define its elements using … Read more

advertisement

C Program to Find the Frequency of Odd and Even Numbers in Matrix

This is a program to find the frequency of odd & even numbers in the given matrix. Problem Description This C Program finds frequency of odd & even numbers in the given matrix. The program first accepts the matrix. Then finds the odd and even numbers in a matrix. Then finds the occurrence of odd … Read more

advertisement

C Program to Check if a Matrix is a Sparse Matrix

Sparse matrix is a matrix with the majority of its elements equal to zero. However, there is no fixed ratio of zeros to non-zero elements. But it is believed that the number of 0’s should be strictly greater than half of the product of rows and columns in a matrix. Example 1: Given matrix: The … Read more

advertisement

C Program to Interchange Any Two Rows and Columns in the Matrix

This C Program interchanges any two rows & columns in the given matrix. The program swaps the values of any 2 rows and columns. Here is source code of the C program to interchanges any two rows & columns in the given matrix. The C program is successfully compiled and run on a Linux system. … Read more

advertisement

C Program to Check if Two Matrices are Equal

This C Program checks if 2 matrices are equal. Problem Description This C Program checks whether the 2 Matrices are Equal. The program first reads 2 matrices and then checks both the matrices are equal. If both the matrices are equal then display they are equal. If both the matrices are not equal then display … Read more

advertisement

C Program to Find Sum and Difference of Two Matrices

This is a C program used to calculate the sum & difference of the matrices. Problem Description This program calculates the sum & difference of the matrices. The program first reads 2 matrices and then performs both addition and subtraction of matrices. Problem Solution 1. Create four 2D arrays (matrices), 2 for storing data, one … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
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.