While I understand that it&#x27;s mostly a question of aesthetics, I don&#x27;t like this also because it might break the expected semantics of continue&#x2F;break in such a loop. When I iterate over things more complex than a single variable where the conditions in a for() would become ugly, I tend to put the domain-specific &quot;increment&quot; into a small static function:<p><pre><code>    static int
    next_pixel(*x, *y, width, height) {
        (*x)++;
        ...
        if (last pixel...)
            return 0;
        return 1;
    }

    &#x2F;* later on... *&#x2F;

    do {
        &#x2F;* do something with coordinates x, y *&#x2F;
    } while (next_pixel(&amp;x, &amp;y, WIDTH, HEIGHT));
</code></pre>
This is, of course, not only restricted to 2D arrays, but could cover walking of a tree or a filesystem...