you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 2 years ago

Assuming it's C/C++, the for and the while loops are not equivalent: the scope of the variable i is not the same.

  • source