C++ weird thing
<p>anyone can explain me, why this parts of code are acting differently?</p>

<pre><code>while((c = fread(buf, sizeof(char), 1, f)) != 0);
{
    if(write(t, buf, c) &lt; 0)
    {
        return E_MSGSEND;
    }
}

/////////////////////////////////////

do
{
    c = fread(buf, sizeof(char), 1, f);
    if(write(t, buf, c) &lt; 0) 
    {
            return E_MSGSEND;
    }
} while(c != 0);
</code></pre>

<p>while {} runs only 1time but do {} while 5times. Whats is the difference? Before while {} c is intialized to 1.</p>

<p>Thanks an advice</p>
