The default initialization for all zeros is as follows:
unsigned dummy[4][4][1024] = { 0 };
If you want to initialize individual elements (and all others to zero), do this
unsigned dummy[4][4][1024] = { { { 5 }, { 0, 4 } } };
and if your compiler knows that C99 uses designated initializers
unsigned dummy[4][4][1024] = { [3] = { [2] = { [0] = 7 }, [1] = { [2] = 3, [1] = 4 } } };
and if you really insist on using all 12
, just repeat 12
16384 times :)
source share