0
Why are the output of this codes different
C++ #include <iostream> using namespace std; int main() { int a =0; cout << ++a + (++a*a++); return 0; } AND JavaScript var a = 0; alert(++a + (++a*a++));
4 Answers
+ 12
As Mr.JPM7 said in a nutshell, try to avoid using these kinds of BAD practices in your learning curve (Since there are so many gotchas in C++ that can give you hard time). but being curious is another thing. If you want to try every single pitfall by yourself deeply, without listing to the mentors' advices then go for it, my brother!
+ 1
That's a cool reply.
but I still don't understand the Arguments from the link