conditional operator in C

The conditional expression, written with the ternary operator ``?:'', provides an alternate way to write this and similar constructions. In the expression ```expr1 ? expr2 : expr3```the expression expr1 is evaluated first. If it is non-zero (true), then the expression expr2 is evaluated, and that is the value of the conditional expression. Otherwise expr3 is evaluated, and that is the value. Only one of expr2 and expr3 is evaluated.