Which is faster in following two code snippets? and Why?
Declared loop index variable outside the for statement:
size_t i = 0;
for (i = 0; i < 10; i++)
{
}
and
Declared loop index variable within the for statement:
for (size_t i = 0; i < 10; i++)
{
}