+ 1
See this
line 1. a=5 line 2. ++a=??. line 3. a++=??. what is the value of ++a in line2. and whats the value of a++ in line3.
4 odpowiedzi
+ 7
it is 6 because line 2 increments value of a// a = 6 now
at line 3 the value of is incremented after a is returned so it is 6// a= 6
after this calling a it will be 7 //try to call a it shiuld be 7
https://code.sololearn.com/WBe4Yw69fzWv/?ref=app
+ 6
1 | a=5
2 | ++a=6
3 | a++=6
+ 5
++ before variable executes ++ before function
++ after variable executes ++ after function
+ 3
at line 1: a=5 //initialized a
at line 2: ++a =6 //increment 1 in value of a
at line 3 : a++ = 6// a value will get increment after