Why does my program repeat forever instead of giving the maximum integer value? : <p>I am currently learning C, and I made a program that I thought would give me the maximum integer value, but it just loops forever. I can't find an answer as to why it won't end.</p>

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

int main()
{
    unsigned int i = 0;
    signed int j = i;
    for(; i+1 == ++j; i++);
    printf(i);
    return 0;
}
</code></pre>

<p>Any help would be appreciated, thank you!</p>
