I have an expression in my code -int i = 10 + + 11 - - 12 + + 13 - - 14 + + 15;The value of the variable "i" is evaluated as 75, which is the sum of all the integers mentioned in the expression. How is the assessment going in this scenario?
int i = 10 + + 11 - - 12 + + 13 - - 14 + + 15;
it is rated as
int i = 10 + (+ 11) - (- 12) + (+ 13) - (- 14) + (+ 15);
rate
int i= 10 +11+12+13+14+15;
and everyone becomes +, so the value is 75.note - - is +
- -
+
First, the entire unary operator will be checked. Example: - - 10 = +10.
Rest, you can appreciate now.