Predict the output : a += a++ - --b + a - b++; when initial value of a=10 and b=5.
Answers
Answered by
30
a=10
b=5
Now,
a+=a++ - --b + a - b++
Or,
a= a + a++ - --b + a - b++
a = 10 + 10 - 4 + 11 - 4
a = 20 + 11 - 10
a = 21
b = 5.
Hence, the output will be
a=21
b=5
Similar questions
India Languages,
4 months ago
Social Sciences,
4 months ago
Math,
4 months ago
Art,
9 months ago
Physics,
9 months ago
Physics,
1 year ago
Chemistry,
1 year ago