Can anyone tell what warning the compiler is giving and how to overcome it?
Code:
warning: excess elements in array initializer
{ {10, 20, 30, 40}, {50, 60, 70, 80}, {90, 100, 110, 120}},
^
note: (near initialization for 'array')
Code:
#include<stdio.h>
int main ()
{
int arr[3][3][3]=
{
{ {11, 12, 13}, {14, 15, 16}, {17, 18, 19} },
{ {21, 22, 23}, {24, 25, 26}, {27, 28, 29}},
{ {31, 32, 33}, {34, 35, 36},{37, 38, 39} },
};
int array [2][3][4] =
{
{ {1, 2, 3}, { 4, 5, 6} },
{ {11, 12, 13}, {14, 15, 16}, {17, 18, 19}},
{ {10, 20, 30, 40}, {50, 60, 70, 80}, {90, 100, 110, 120}},
};
return 0;
}