If a = 5, b=1, find the value of c.
C=a + ++a + ++b + a++ + a++ +b;
with step by step procedure please answer fast
Answers
Answered by
2
Answer:
c= 5+6+2+6+7+2
c= 28
Explanation:
++a means increase of value immediately
a++ means increase of value in the memory but not in the answer
so we first we will do write 5 only as it is only a
then ++a is 6 (immediate increade of value) then ++b is 2 (immediate increase) then a++ (which should be 7 but since we don't increase immediately in a++ we will write 6 but in the memory it is 7) then a++ is 7 (as in the memory it was 7 and then again it is a++...our actual answer should be 8 now but since we don't increase the value immediately it is 7) and then b which is 2
Similar questions