Hi,
I'm totally confused when I want to define parameter inside loop like this
So we know that once we define a variable as the compiler link to it specific address, my question is about variable j in my case, will the compiler relate to it as new variable at every iteration? I mean :Code:for (int i=0; i<25;i++) { int j=0; j++; }
first iteration j=0; j++
second iteration j will still j=0; j++
third iteration j will still j=0; j++
etc ...
does the compiler at every iteration will define j again and initialize it again with 0 at every iteration?
what's confusing me is how the pc/compiler will deal with defining variable that are inside the loop's block that we are looping again and again on the same loop's block(for or while loops doesn't matter)?