difference between if else and conditional operator
Answers
Answered by
0
Answer:
The if statement doesn't yield a value, so the statements in the "then" and "else" parts don't need to be type compatible in any way. The conditional operator yields a value, and therefore both parts must be type compatible in some way in order for the compiler to determine the type of the expression.
Answered by
5
Answer:
the if statement doesn't end the value show the statement in the the then else path don't need to be type
Similar questions