I have following struct:
typedef struct my_struct {
int a;
int b;
int *c;
} my_struct;
is:
my_struct n = (my_struct) { .b = 3 };
equivalent to:
my_struct n = (my_struct) { .a = 0, .b = 3, .c = NULL };
What about:
my_struct n = (my_struct) { .b = 3, 0 };
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…