C program to print the marks using two dimensional array.
#include <stdio.h>
int main()
{
int marks[2][4] = {{343 , 56 , 89 , 45},
{3 , 2 , 7 , 5}};
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\n", marks[i][j]);
}
printf("\n");
}
return 0;
}
OUTPUT:
343
56
89
45
3
2
7
5
Tysm
ReplyDelete