title: Parentheses and logical operators
body: <p>consider this code (C++) :</p>
  
  <pre><code>int x = -4 , y = 5 ;
  bool result = x &gt; 0 &amp;&amp; y++ &lt; 10 ;
  </code></pre>
  
  <p>the expression (x > 0) will be evaluated first , and because (x > 0 = false) and due to short-circuit evaluation , the other expression (y++ &lt; 10) won't be evaluated and the value of y will remain 5 .</p>
  
  <p>now consider the following code :</p>
  
  <pre><code>int x = -4 , y = 5 ;
  bool result = (x &gt; 0) &amp;&amp; (y++ &lt; 10) ;
  </code></pre>
  
  <p>it is expected that the expressions in parentheses will be evaluated first so that before the logical AND is performed , the expression (y++ &lt; 10) would have been evaluated and the value of y has became 6 
   , but the reality is that the value of y remains 5 . which means that even with the parentheses the evaluation is short-circuited and the expression (y++ &lt; 10) is ignored .</p>
  
  <p>What is the explanation for this case ?! </p>