In higher level languages I would be able something similar to this example in C and it would be fine. However, when I compile this C example it complains bitterly. How can
It is also possible to hide the memcpy by using the compiler's block copy of structs. It makes the code ugly because of all the .i and i: but maybe it solves your specific problem.
typedef struct {
int i[3];
} inta;
int main()
{
inta d = {i:{1, 2, 3}};
if (1)
d = (inta){i:{4, 5, 6}};
printf("%d %d %d\n", d.i[0], d.i[1], d.i[2]);
return 0;
}