- 3
what is the output of this code? int a = 4; int b = 6; b = a++; console.writeline(++b); _ pls help me
17 odpowiedzi
+ 4
5
+ 2
5 answer
+ 2
5
+ 2
5
and just after those commands the var b will contain 6 because the ++ working after the command ...
+ 2
in my last comment here was a mistake
the answer is 5 of course, because when you put ++ before the var name the program adding 1 to the var and than copying the value to b but if you put it after a like a++ the program first applying the value to b and after that adding 1...
hope I'm helped...
+ 1
it's 5
+ 1
Yes it is 5
0
5
0
5
0
5
0
5
- 3
it was don't
- 3
6
- 5
sorry this answer correct
- 6
6 its the answer
- 7
The out put it will be 7
- 7
7 is it correct