title: Why printf() in while() as a condition prints different output
body: <h2>First code</h2>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      while(printf("Hello"))
      return 0;
  }
  </code></pre>
  
  <p>Produces only <code>Hello</code> as a output</p>
  
  <h2>Second code</h2>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      while(printf("Hello"));
      return 0;
  }
  </code></pre>
  
  <p>Second code prints <code>Hello</code> for infinite times.</p>
  
  <h2>Third code</h2>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      while(printf("Hello"))
      {}
      return 0;
  }
  </code></pre>
  
  <p>Third code also prints <code>Hello</code> for infinite times.</p>
  
  <h2>Compiler used  - GCC 9.0.1</h2>
  
  <h2>why this is happening?</h2>