title: How does the condition (Expression-2) of this for loop work?
body: <pre><code>#include &lt;bits/stdc++.h&gt;
  using namespace std;
  
  int fun()
  {
    static int num = 16;
    return num--;
  }
   
  int main()
  {
    for(fun(); fun(); fun())
    cout&lt;&lt; fun()&lt;&lt;&quot; &quot;;
    return 0;
  }
  
  Output : 14 11 8 5 2 
  </code></pre>
  <p>How does the condition (expression-2) of the for loop work? I mean, why does it terminate when fun returns 0 (num becomes -1)?</p>