Iterate an array from the middle then the beginning
<p>I want to iterate through any array starting at an index that's close to the middle, go to the end then go to the beginning.<br>As an example:</p>

<pre><code>#include &lt;stdio.h&gt;

int main(){


int a[]= {1, 2, 3, 4, 5, 6, 7,};

int i = 0;

for (i = 2; i &lt; 6; i++){

    if (i == 6){
        i = 0;

    }

    printf("%d\n", a[i]);
}

return 0;
}
</code></pre>

<p>How can I "reassign" the index to be zero when it reaches the end (index 6)</p>