From where you get this beautiful question ?
Basic point, &* are inverse to each other.
*((a)?&b:&a) = a ? b : c;
if you clearly observe,
*((a)?&b:&a) is simply as,
if a=0, then it is *( address of a ) ===> assigning value to a
if a=1, then it is *( address of b ) ===> assigning value to b
But why it is written, like * ( & ) ? due to they apply ternary operator ==> it result r-value but not l-value, So they indirectly use like this.
First evaluate right side of "=" operator ( as per associativity and precedence rule ) ==> which results value of c, i.e., 3
Assign it to a
∴ a = 3
Now i have a doubt, that " Is it lead to undefined behavior ? "
Ans : NO, think why it is not undefined behavior.