printing the elements of a 3d Array

 #include <stdio.h>


int main(){

int arr[2][3][4];
for (int i=0; i<2; i++)
 {
     for(int j=0; j<3; j++)
     {
         for(int k=0;k<4;k++)
         {
             printf("Enter the elements of array :\n");
             scanf("%d",&arr[i][j][k]);
         }
     }
 }

 for (int i=0; i<2; i++)
 {
     for(int j=0; j<3; j++)
     {
         for(int k=0;k<4;k++)
         {
             printf("The  of the elements of array is:%u\n",arr[i][j][k]);
         }
     }
 }
  return 0;
}

Comments