5.6 — The conditional operator
Operator Symbol Form Meaning Conditional ?: c ? x : y If conditional c is true then evaluate x, otherwise evaluate y The conditional operator (?:) (also sometimes called the arithmetic if operator) is a ternary operator (an operator that takes 3 operands). Because it has historically been C++’s only …