title: Can someone explains why this code prints 4?
body: <p>The output of this code is <code>4</code>, and I don't understand why. Can someone please explain why?</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  int main(){
      int val = 1;
  
      do{
          val++;
          ++val;
  
      }while (val++ &gt; 25);
      cout &lt;&lt; val &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>