I have a code of structs stated as below:
typedef struct A {
B numberOfB[3];
} A;
typedef struct B {
int number1;
int number2;
boolean bool1;
boolean bool2;
} B;
In the source code I have an initialization which looks like this:
A* pointerToA = (A[3]) {
{5, 1, TRUE, TRUE,
6, 1, TRUE, FALSE,
7, 1, TRUE, FALSE},
{5, 1, TRUE, TRUE,
6, 1, TRUE, FALSE,
7, 1, TRUE, FALSE},
{5, 1, TRUE, TRUE,
6, 1, TRUE, FALSE,
7, 1, TRUE, FALSE},
}
Such construction in source code is updating fields in struct B but I do not understand how are fields in B are updated as the values are just listed as it was a array of 12 values. Could someone explain that in details?