C Program to Compute Transpose of a Matrix

This example will show you how to compute transpose of a matrix in C program. In this example a user will be asked to enter the number of rows and columns for matrices. Then user will be asked to enter the elements at each index of the matrix. A matrix has to be square matrix for computing the transpose of that matrix.

Here we will see also how to use pointers to allocate memory dynamically for array using malloc function.

Continue reading “C Program to Compute Transpose of a Matrix”

C Program to Multiply Two Matrix Using Multi-dimensional Arrays

This example will show you how to multiply two matrices using two dimensional array in C program. In this example a user will be asked to enter the number of rows and columns for matrices. Then user will be asked to enter the elements at each index of the matrices.

Here we will see also how to use pointers to allocate memory dynamically for array using malloc function.

Continue reading “C Program to Multiply Two Matrix Using Multi-dimensional Arrays”