The declaration of a variable i inside the for block is completely valid. It (the declaration) is hiding an external variable i. The line, which initializes the static variable j, is executed only once, so on this line i variable will not be incremented and the value of j will not change in subsequent iterations of the loop.
Ввійдіть щоб вподобати
Ввійдіть щоб прокоментувати