-
Notifications
You must be signed in to change notification settings - Fork 0
/
matrix.c
36 lines (30 loc) · 824 Bytes
/
matrix.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdio.h>
int main()
{
// printf("Hello World\n");
int marks[2][4] = {{45, 23, 24, 37},
{32, 21, 34, 36}};
// for(int i = 0; i < 4; i++)
// {
// printf("Enter the value of %d element of the array\n", i);
// scanf("%d", &marks[i]);
// }
for (int i = 0; i < 2; i++)
{
for (int j = 0; j < 4; j++)
{
/* code */
// printf("The value of %d, %d element of the array is %d\n", i, j, marks[i][j]);
printf("%d ", marks[i][j]);
}
printf("\n");
}
// marks[0] = 34;
// printf("Marks of student 1 is %d\n", marks[0]);
// marks[0] = 4;
// marks[1] = 24;
// marks[2] = 34;
// marks[3] = 44;
// printf("Marks of student 1 is %d\n", marks[0]);
return 0;
}