conditional operator is also called as ternary operator .it is similar to if-else statements .it has total three statements .the first statements is condition expression.
The conditional operator works as follows:
The first expression conditional Expression is evaluated at first. This expression evaluates to 1 if it’s and evaluates to 0 if it’s false.
If conditional Expression is true, expression1 is evaluated.
If conditional Expression is false, expression2 is evaluated.