Write a ternary operator

Report a typo

How can you rewrite the following conditional statement using a ternary operator?

if (a + b == c) {
    d = c;
} else {
    d = 10;
}

All variables are integers.
Select one option from the list
___

Create a free account to access the full topic