+ 1

I am not able to understand "--x" how do we actually calculate it?

29th Sep 2017, 2:16 PM
JIGAR Shah
10 odpowiedzi
29th Sep 2017, 2:24 PM
Nithiwat
Nithiwat - avatar
+ 9
https://www.sololearn.com/Discuss/407846/?ref=app
29th Sep 2017, 2:51 PM
Hatsy Rei
Hatsy Rei - avatar
+ 3
It's equivalent to x = x-1
29th Sep 2017, 2:24 PM
Kartikey Sahu
Kartikey Sahu - avatar
+ 3
a=--8 gives error
29th Sep 2017, 2:35 PM
Kartikey Sahu
Kartikey Sahu - avatar
+ 2
if x = 10, --x = 9
29th Sep 2017, 2:25 PM
Andrea Simone Costa
Andrea Simone Costa - avatar
+ 1
lets say: a = 8 b = --a //a wil get lowered with one and set as value of b (now a = 7 and b = 7) c = b++ //c will get the value of b, then b wil get higher with one (now c = 7 and b = 8)
29th Sep 2017, 2:48 PM
Lord Teacrumble
Lord Teacrumble - avatar
+ 1
thanks alot lord teacrumble
29th Sep 2017, 2:56 PM
JIGAR Shah
0
a=--8; b=++a; please tell me how does it calculate and whats the value of a and b ?
29th Sep 2017, 2:32 PM
JIGAR Shah
0
no problem :)
29th Sep 2017, 3:02 PM
Lord Teacrumble
Lord Teacrumble - avatar
0
jutt brand
30th Sep 2017, 8:09 AM
irfan