This is not valid C11.
You can only initialize an array with an initializer-list not with an expression.
int why[2] = { ... }; // initializer-list {}
Moreover, 1 == 1 ? {1,2} : {3,4}
is not a valid C expression because {1, 2}
is not a C expression.
Just for information using compound literals you can have something close to what you want using a pointer object:
int *why = (1 == 1) ? (int[2]) {1,2} : (int[2]) {3,4};
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…