Computer Science, asked by Artybabe, 1 year ago

The answer give in book is 32. pls expalin how this amswer came

Attachments:

Answers

Answered by nancyyy
2
see this equation can be written this way
i+=i means i=i+i
i-- is a decrement operator ,It means that i value which is 12 will be stored and used afterwards if i is given there
--i means it is a decrement operator but minus sign is given before so i value would be reduce instantly..So now i value would be 12-1 which is equal to 11
Answered by isiddagangajkd
2
i-- 

i+ = i-- + --i

i+ = 12 + 10 -> 12 because i-- is use first and do subtraction , 10 because --i is subtract first then use. Now i value is changed to 10.

i+=22 -> 22+10 =32 because a+=b is a= a+b

hope it will help you understand, if not revert back



Artybabe: I didnt uNderstand
nancyyy: i value is now stored as 10 naa
nancyyy: thats why
isiddagangajkd: Yes
Similar questions