Ternary Operator |
||||
40 views
ternary operator is used where if statement is simple.If the expression 1 is true it expression2 execute otherwise expression 3 will execute. expression1 : Indicates condition for ternary operator.if this is true then expression2 will execute else expression3 will execute. expression2 : Indicates first statement. expression2 : second statement. Example : z = (a>b) ? a : b; |
| « data types | CSS History » |
| Posted on Thursday, June 12th, 2008 at 4:39 pm under C For Beginners | RSS 2.0 Feed | |