Unless, of course, you find yourself in one of the languages with broken associativity or precedence.
`? :` has to be right-associative, and should have the lowest precedence of any "normal" expression (only assignment and comma expressions are lower). Note however that the middle expression does not care about associativity, though readability suffers if it has a lower precedence than the ternary itself (a ? b = c : d).
As far as prettified indentation goes:
* if any argument is itself a ternary, force a break before it
* if you have to break after `?`, indent
* if you have to break after `:`, indent unless the following is a ternary
**
Note also that logical if-then-else is not actually the only kind of ternary expression; it's just the only one that C exposes. Common other ternary expressions in some contexts include: bitwise if-then-else (aka select - note that the famous bithacks page lies about xor being cheaper, since it forgets that andnot is a primitive), modular exponentiation, fused multiply-add, bitsearch (unless your type system can supply the needle width), various "foo and right shift" that would otherwise return more than a register (foo = multiply, interleave, lcm, pow) and "foo and left shift" that would return a fraction (foo = div, sqrt, cbrt). Passing in a rounding mode or something can also add an argument to many ops.