To be clear, (++x)*(++x) is undefined behavior because you cannot modify the same object more than once between sequence points. You can't and shouldn't expect any particular result from undefined behavior. It might even cause demons to fly out of your nose, which is usually not what one would expect.