Why this code is not giving error? We cannot declare the same variable twice but here when the inner loop terminates and re-enters every time i is re-declared. ??Why is it not giving error??
how does it ever get to the i loop? j start out > 0 therefore the outer loop should never execute.
but if it did... i is able to re-declare itself because its scope is limited to the for loop. once the loop finishes, it is destroyed, and thus can be redeclared when the loop starts again.