Computer Science, asked by Sanjeetsd5599, 1 year ago

What is ternary operator in C? Give example expression for its use.

Answers

Answered by tushar7381
1
Ternary Operator in C

The ternary operator is used to execute code based on the result of a binary condition.
It takes in a binary condition as input, which makes it similar to an 'if-else' control flow block. It also, however, returns a value, behaving similar to a function.

Similar questions