Disclaimer: this post is sort of a motivating post for students. Professional programmers may find it uninteresting or painful (especially if you code in C# or Java or JavaScript). C++ is the hardest…
As of this writing (but perhaps not for very much longer!) the four mainstream compilers on Godbolt Compiler Explorer give four different answers for this simple C++ program: