Computer Science, asked by Anonymous, 8 months ago

What's the difference between ternary operator and if-else statement??​

Answers

Answered by kjjio
9

Answer:

Ternary Operator is a programming statement. “If-Else” is a programming block. The statement is, of course, faster than Block. In the initialization of variables, the Ternary Operator can be used where as if conditions can not be used.

Explanation:

mark my  answer as brainliest

 

Answered by pushpanegi1403
8

Answer:

Difference between Ternary Operator and If Else:-

Ternary Operator is a programming statement. “If-Else” is a programming block. In the initialization of variables, the Ternary Operator can be used where as if conditions can not be used. For example, variable “max” is assigned with value either a or b based on condition.

HoPe it's help you..

PleAse marK mE aS brainliEst ✌️☺️..

AnD follow me..

And thank my answer...

❤️(◍•ᴗ•◍)❤

Similar questions