Is the condition of a loop re-evaluated each iteration? [duplicate]
Yes, semantically it will be evaluated on every loop. In some cases, compilers may be able to remove the condition from the loop automatically – but not always. In particular: void foo(const struct rect *r) { for (int i = 0; i < r->width * r->height; i++) { quux(); } } The compiler will not … Read more