+ 1

x=3 then y=++x + x++ what is the answer?

24th Jun 2016, 9:30 PM
Utpal Kumar
Utpal Kumar - avatar
8 odpowiedzi
+ 1
y=8
25th Jun 2016, 3:27 AM
Dev!L
Dev!L - avatar
+ 1
After execution y = 8, x = 5
25th Jun 2016, 5:07 AM
Dmitry Pudov
Dmitry Pudov - avatar
+ 1
first, ++x return 4 and x add one to itself, then x++ return 4 too.At last x add one to itself. so y=4+4,x=3+1+1
25th Jun 2016, 8:32 PM
xenon
- 1
y =9
25th Jun 2016, 5:26 AM
Stanzin Eknyan
Stanzin Eknyan - avatar
- 2
y =9;
25th Jun 2016, 12:01 AM
yousuf
- 2
y = 7
25th Jun 2016, 3:02 AM
artdier
- 2
output y=4 x=5
25th Jun 2016, 6:46 AM
prateek
- 3
its GG feed bot lane And no ganks plus quit midlane
25th Jun 2016, 8:11 AM
Noel Leonor
Noel Leonor - avatar