Computer Science, asked by jpppl, 10 months ago


Why is the conditional operator used as an alternative to if else?

Answers

Answered by pawankumar856
3

You may be wondering why should we use conditional operator if it does the same job as if-else statement. The main purpose of using it is to make code shorter and more readable. For simple conditions, you can evaluate it in a single line with less code than if-else.


pawankumar856: Mark as brainiest
Answered by kaverisabharwal175
0

Answer:

to make code shorter and easier to understand. hope it helps

Similar questions