Things to note: 1. The syntax used in the statement c=(a>b)?a:b is expression 1? expression 2 : expression 3. It is called as ternary operators.? : are called as conditional operators. 2.First the expression 1 is evaluated, if it is true, the value of expression 2 is stored in c, if it is false, the expression 3 value is stored in the variable c. Powered by
|