+ 1
Last question in c++ basic 11/11
I dont understand why the answer is 4 and not 5. Can anybody explain?
7 ответов
+ 2
No, 3 is just read first
+ 1
because a++ = 3 and b = a++
so ++b = 4
+ 1
but a is initially 3, so doesnt b = a++ make b = 4?
+ 1
because b equals 3 before 1 is added
+ 1
x++ = x + 1
++x = 1 +x
+ 1
so
a = 3
b = a++
b = 3 ?
so the ++ is not really necessary?
0
or it just has no meaning in this scenario?