→(Discussion: Use of iterating variables on for loops)
Option 1: Declare the variables outside the loop; initialize them inside the loop; keep their exit values for future use.
int i; for (i = 0; i<5; i++) printf("."); // Prints ..... printf("%d",i); // Prints 5
Option 2: Declare and initialize variables inside the loop; lose the variable at the end of the loop scope;
| fmDeOliveira || I definitely prefer option 2. It is much easier to keep recycling the loop variables without having to worry if they already exist or not. In case we need the value of the loop variable after the loop is done, we should just copy it to another variable before the end of the loop.