C99 Structure Designated Initialisers and other value
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; }; So following is valid : struct myStruct m = {.f = 10.11, .i = 5, .c = 'a'}; Also it is said that uninitialised members will be set to 0 . So struct myStruct m = {.f = 10.11, .c = 'a'}; here i will be set to 0 But, for the following : struct myStruct m = {.f = 10.11, .c = 'a', 6}; i is still initialized to 0. What is the reason if we do such compound initialization. This is covered in the draft C99 standard section 6.7.8 Initialization , basically if the