This is a simple C program that performs basic matrix operations:
- Addition
- Multiplication
- Transpose
It uses functions and 2D arrays for better understanding.
- Compile the program:
gcc matrix.c -o matrix
- Run the program:
.\matrix
Matrix/
|-matrix.c
|-matrix.png
|-README.md
Enter rows and columns of Matrix A:2 2
Enter rows and columns of Matrix B:2 2
Enter elements of Matrix A:
Enter element [0][0]: 1
Enter element [0][1]: 2
Enter element [1][0]: 3
Enter element [1][1]: 4
Enter elements of Matrix B:
Enter element [0][0]: 5
Enter element [0][1]: 6
Enter element [1][0]: 7
Enter element [1][1]: 8
Matrix Addition Result:
6 8
10 12
Matrix Multiplication Result:
19 22
43 50
Transpose of Matrix A:
1 3
2 4
- 2D Arrays
- Functions
- Loops
M.Bharadwaj
