Describe the use of conditional operator with example
Answers
Answered by
1
Answer:
The conditional operator (? :) is a ternary operator (it takes three operands). The conditional operator works as follows: ... If the first operand evaluates to true (1), the second operand is evaluated. If the first operand evaluates to false (0), the third operand is evaluated.
Answered by
0
Answer:
it is a ternary operator. it is used to evaluate a condition that's applied to one or two boolean expressions. The result of the evaluation is either true or false. As conditional operator works on three operands, so it is also known as the ternary operator
Similar questions