What value is placed in var?var = 12 > 9 ? 0 : 1;
Answers
Answered by
2
0 is stored in the variable var .
Explanation:
- In the given statement the ternary operator is used it means if the condition is true then it executed the statement that are inside the ? block otherwise it executed the statement inside the : block .
- In the given statement 12>9 the condition is true so the statement inside the ? block is executed it means the variable var is storing the value 0 inside it .
- Therefore the value of variable var is 0.
Learn More :
- brainly.in/question/1404862
Similar questions