Need help...solve this with steps...want the explanation plz..its urgent | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 3

Need help...solve this with steps...want the explanation plz..its urgent

int a= 5; a-=(a--)-(--a);

21st May 2017, 4:07 PM
Dolu
Dolu - avatar
2 Réponses
+ 8
a = 5 a -= a-- - --a a-- -> first use, then decrement a -= 5 - --a --a -> first decrement, then use, note* a has not yet been decremented by previous prefix. a -= 5 - 4 , a = 4 a -= 1, a = 4 4 -= 1 also denoted: a = 4 - (1) a = 3
21st May 2017, 4:22 PM
Rrestoring faith
Rrestoring faith - avatar
+ 3
thanx☺
21st May 2017, 5:52 PM
Dolu
Dolu - avatar