Because it's passed by references it's created as referenced variable. It therefore holds the second last variable during the second loop (If it would iterate one more time it would be the exclamation mark rather then a 'b')
The reason the output is 8 and not 9, is because 0.1 + 0.7 is stored as 0.79999999999~ when multiplied the value remains stored as such and when casted to an int everything past floating point gets discarded. Resulting in 7. And 7 + 1 = 8.