+ 1
Why does int n=3 ; n=++n + ++n; outputs n=10?
On implementation with python, c and JS I get different answers
4 Réponses
+ 1
Martin Taylor How does architecture affect pre/post increment operators.
For compilers, sure, they are allowed to do whatever they want. But I'm yet to see a compiler that generates code that behaves differently on different architectures.
0
1. Operator precedence and parentheses
2. Compulsory Type Conversion