C program to Initialize and Print Matrix
Write C program to Initialize and Print Matrix
// C program to Initialize and Print Matrix #include<stdio.h> int main() { int A[3][3] = {{1, 2, 3}, {5, 6, 7}, {7, 8, 6}}; int i, j; printf("The matrix is :--> \n"); for(i = 0; i < 3 ; i++) { for(j = 0; j < 3; j++) { printf("%d ", A[i][j]); } printf("\n"); } return 0; }
Output:
The matrix is :-->
1 2 3
5 6 7
7 8 6