Computer Science, asked by swampkiller2, 6 months ago

(6) write
the difference between if-else and ternary
operator with example.

Answers

Answered by tiwarikuldeepnarayan
1

Answer:

Difference between Ternary Operator and If Else

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.

Answered by sayantika7729
0

Answer:

Difference between Ternary Operator and If Else

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.

Similar questions