The ternary conditional operator has right-to-left associativity. For example,

x?y?z:u:v;

be simply interpreted as:

if(x)
{
   if(y)
   { z; }
   else
   { u; }
}
else
{ v; }

Also
x = a ? b : c ? d : e;

is interpreted as: 
x = a ? b : (c ? d : e)