Evaluate a+a+++a if a= 20 initially
Answers
Answered by
3
a += a+ (++a) is the same as a = a + a + (++a)
First thing that happens is that a++ will set a to 21,
after that it will calculate: a = a + a + a;
21 + 21 + 21 = 63
so the result is 63.
First thing that happens is that a++ will set a to 21,
after that it will calculate: a = a + a + a;
21 + 21 + 21 = 63
so the result is 63.
Similar questions