Originally Posted by
iMalc
You've actually picked a particularly complex example there. It depends on what compiler and what compiler settings are chosen. The scope of a for-loop variable used to be greater than the body of the loop, but in modern compilers that aren't set to a compatibility mode, it is just inside the loop.
Thus on newer compilers, if you had three such loops one after the other, it could use the same memory location for each for loop variable if it wanted to. Of course it might not even use a memory location at all, since it might be happy just holding the value in a register.