In simple words, what is the ?: (conditional, "ternary") operator and how can I use it?
?:
z = (x == y ? 1 : 2);
is equivalent to
if (x == y) z = 1; else z = 2;
except, of course, it's shorter.