A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-67.cpp
1#include<iostream>
2intmain(){
3intx=5;
4inty=x+++++x;
5std::cout<<y<<" "<<x<<"\n";
6}
Numbers
Answer & explanation
Console output
12 7
Why
Each side has its own sequenced increment. x++ yields 5 (x becomes 6), then ++x makes x 7 and yields 7. The sum is 5 + 7 = 12, and x finishes at 7. (Both modifications are sequenced through distinct full sub-expressions here, so the result is well-defined under clang.)