Will the strlen() function below get called just once (with the value stored for further comparisons); or is it going to be called every time the comparison is performed?
I'll sometimes code that as ...
for (int i = 0, n = strlen(word); i < n; ++i) { /* do stuff */ }
... so that strlen is only called once (to improve performance).