Assuming that all variables after the assignment operator are properly initialized, what would this multiple ternary operator look like grouped together?
int x = m < n ? n < o ? o < p ? p : o : n : m;
Edit: This seems like a question of operator precedence with regards to multiple ternary syntax. Following examples provided in the link, I think grouping this statement should look like the following:
int x = (m < n ? (n < o ? (o < p ? p : o) : n) : m);
Where o < p ? p : o
is executed first
Followed by n < o ? (...) : n
Followed by m < n ? (...) : m
Is this right?