I am aware that in C99 you can initialize members of the structure using member name as follows :
struct myStruct
{
int i;
char c;
float f;
};
In case of
struct myStruct = {.f = 10.11, .c = 'a', 6};
the value 6
which is non-designated initializer will assign to the member just after the member initialized with designated initializer. So, in this case, member f
is just after c
and hence it will be initialized to 6
. i
still will be initialized to 0
by default.