In simple words, what is the ?: (conditional, "ternary") operator and how can I use it?
?:
It is called the ternary operator
tmp = (foo==1 ? true : false);