+ 3

How to write a program fot mattrix?

19th Apr 2019, 3:15 PM
Saurabh Kumar Mishra
Saurabh Kumar Mishra - avatar
2 Answers
+ 4
To write a program for matrix you need to use two dimensional array... and access the value of array by using nesting of for loop.. Eg- for 3*3 matrix int arr[3][3]= {{1,2,3}, {4,5,6}, {7,8,9}}; And you can access it by int i, j; for(i=0; i<3; i++){ for(j=0; j<3; j++){ printf("%d", arr[i][j]); } }
19th Apr 2019, 3:56 PM
Prabhat Kumar Singh
Prabhat Kumar Singh - avatar
+ 5
You should use two dimensional array to write program.
22nd Apr 2019, 2:10 PM
Aakash
Aakash - avatar