int x = 0;
while (x < 5){
int y = x++;
}
Does this mean the variable y is initialize every time we go through the loop? Or does it mean the variable y is not pop off the stack until the loop end? To put it simply, is it faster to declare y inside or outside of the loop, given that I won't use y outside of the loop?


Sign In
Create Account


Back to top









