C : Program of declaring and initializing 2D Array
Oct 17, 2023
Program :
//c program of declaring and initializing 2D Array
#include<stdio.h>
int main()
{
int arr[3][3] = {{3,4,5},
{5,6,3},
{3,9,7}
};
printf("2D Array Elements :\n");
for(int i=0; i<3; i++)
{
for(int j=0; j<3; j++)
{
printf("%d ", arr[i][j]);
}
printf("\n");
}
return 0;
}
Output :