+ 3
Different results of compilers in c++ code. [Solved]
int b= 7; cout<< (++b + b++); why the answer is 17 and not 16?, I was checking in many compilers, some gave 16
3 Respostas
+ 1
correct answer is 16,
its all about pre increment and post increment.
+ 1
that's right Meraj according to the definition, ++b = 8, b++ = 8, thus, the answer is 16, but the majority compilers to gave 17