+ 2
Why output is 252 instead of 210?
For C++ : What's the logic for 252 here? https://code.sololearn.com/c2b2fqv6fn71/?ref=app
5 Respostas
+ 7
The compiler (gcc) is resolving 6*6*7 and not 5*6*7:
int i=4,x;
x=++i* ++i* ++i;
Another compiler might do something different. Multiple pre/post operators, in one statement on a variable, land in one sequence point and result in undefined (means: compiler-specific) behavior.
+ 4
If you still have questions after reading this just ask. Also this website is a great source of info for C++.
http://en.cppreference.com/w/cpp/language/eval_order
+ 3
Regardless of the output (matching or not), output depends on the compiler; it is unreliable.
[edited]
+ 1
So we'll have different values for same code of c++ on different compilers.??
0
@jaya I think no !!