If you
struct X
{
type_a var_a;
type_b var_b;
type_c var_c;
type_d var_d;
};
you can initialize the object as follows:
struct X x = {value_a, value_b, value_c, value_d};
But this means that you need to know the order of the variables in X, and also have an initial value for all of this. Alternatively, you can initialize as follows:
struct X x = {
.var_a = value_a,
.var_b = value_b,
.var_c = value_c,
.var_d = value_d
};
That way, you can initialize member variables in any order, or even skip some.
, , , . , .