Quote:
Originally Posted by fysiks
When strlen() is inside the for() the it is called which is slower than just accessing a value from a variable.
|
Ok, because I was under the impression that the first statement in the for loop is the initialization line.
Code:
for (initialization; condition; step)
// Code
Code:
for (i = 1; i <= 10; i++)
printf("%d", i);
If what your saying is true, then this will never reach 10, it will just keep on printing out 1s for the rest of time. Does not make much sense to me.
__________________