Boolean comparison says it is true but the if says it is false : <p>sorry if this question too basic for you guys, but I have this code that make me confuse. I create a boolean comparison before the if and put the same comparison to the if condition but it doesn't get executed inside the if block.</p>

<pre><code>#include&lt;iostream&gt; #include&lt;cstdio&gt;

using namespace std;

int main()
{
    float s[2] = {0.24};
    printf("Is this is true? (1 = yes, 0= false): %d", s[0] &gt;= 0) &amp;&amp; (s[0] &lt; (1/7 + 1/14));

     printf("\nBefore if: s[%d] %f\n", 0, s[0]);
     if ((s[0] &gt;= 0) &amp;&amp; (s[0] &lt; (1/7 + 1/14)))
     {
        s[0] = 10;
    }

    printf("\nAfter if: s[%d] %f\n", 0, s[0]);
    return 0;
}
</code></pre>
