English, asked by vivoyo9123, 28 days ago

Explain the working of conditional operator
with an example. What type of operator is
it?​

Answers

Answered by anjugoyal954
0

Answer:

The result of the conditional operator is the result of whichever operand is evaluated — the second or the third. Only one of the last two operands is evaluated in a conditional expression. Conditional expressions have right-to-left associativity. ... If both operands are of the same type, the result is of that type.

Explanation:

An Example of Conditional Operators

The conditional operator "&&" first evaluates whether its first operand (i.e., number % 2 == 0) is true and then evaluates whether its second operand (i.e., number % 4 == 0) is true. As both are true, the logical AND condition is true. Leahy, Paul.

Answered by armygurrl
0

Answer:

An Example of Conditional Operators

The conditional operator "&&" first evaluates whether its first operand (i.e., number % 2 == 0) is true and then evaluates whether its second operand (i.e., number % 4 == 0) is true. As both are true, the logical AND condition is true. Leahy, Paul.

Similar questions