struct s { int i[5]; }; struct s arr; void f(void) { arr = (struct s){ .i[0 ... sizeof arr.i / sizeof arr.i[0] - 1] = 123 }; }