You write/declare it once in the static C code; but at runtime, its declaration is passed and its initialization is performed many times. All modern mainstream compilers would pull that constant declaration out of the loop (and as soon as the most modest optimization is enabled, eliminate all of y from the code); but conceptually, y's scope is left with each iteration, and y is initialized over and over again each time the control flow passes the declaration.
↧