Skip to content

Conditional Operator

int max = (a > b) ? a : b; // (1)!
  1. The (a > b) is evaluated first, if it results into non zero, the expression is evaluated to be a, otherwise it is evaluated to be b.