What are these called [duplicate]
Possible Duplicate: What does ‘?’ do in C++? What are these kind of statements in c++ called: testNumber > 1 ? true : false; ternary statements That's the conditional operator . The expression a ? b : c evaluates to b if a is true and c if a is false . In most languages, this is the only example of a ternary operator, an operator that takes three arguments. Conditional Expression Conditional Expression <------------------------> (x < y) ? x : y |_____| |________| Test Conditional Expression Operator The '?' and ':' make up the conditional operator. Ternary operator. http://en.wikipedia.org