What is the difference of declaration of a variable in a loop and before the loop?

Posted by Ehsan Mamakani on Stack Overflow See other posts from Stack Overflow or by Ehsan Mamakani
Published on 2010-04-30T09:52:50Z Indexed on 2010/04/30 10:07 UTC
Read the original article Hit count: 122

Look at this example:

int i;
for (i=1;i.......

and this:

for (int i=1;i........

What's the difference between them?

© Stack Overflow or respective owner

Related posts about programming

Related posts about programming-related