Which one of the following two is better in terms of good programming design, speed, efficiency and memory point of view?
1)
for(int i=0;i<10;i++)
{
...
}
2)
int i;
...
...
for(i=0;i<10;i++)
{
...
}
I mean, if there are many such (or maybe different) loops in program, then which one should be used?