What does this code mean?
struct foo_t {
int a;
int b;
} foo[10] = {{0,0}}
foo[0] is {0,0}, but what about the rest?
How does the C standard handle this?
ADDED. I founded an exhaustive answer here. I think my question should be deleted.
The entire array will be initialized with structs with the value 0 for both
aandb. This is similar to the following case with a primitive value:Where every integer in the array will be initialized with the value
0.The C99 standard specifies the following: