title: Are multiple conditions allowed in a 'for' loop?
body: <p>The following code runs without giving any errors or warnings:</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(){
      int i, j;
      int p = 0, q = 2;
      for(i = 0, j = 0; i &lt; p, j &lt; q; i++, j++){
          printf(&quot;Hello, World!\n&quot;);
      }
      return 0;
  }
  </code></pre>
  <p>However, the book <em><a href="http://www.slideshare.net/faniamjad/cfakepathlet-us-c-yashwant-kanetkar" rel="nofollow noreferrer">Let Us C</a></em> (Yashwant Kanetkar) says that only one expression is allowed in the test expression of a <em>for</em> loop (see page 115 of the book).</p>
  <p>I am not sure of the standard. Are multiple expressions allowed in the test expression of a <em>for</em> loop?</p>
  <p>I surely can join the two expressions, but I was dumbstruck when I found the above code on <a href="http://geeksforgeeks.org/output-of-c-program-set-22" rel="nofollow noreferrer">this website</a>. Is this valid C code or not?</p>