title: Why is 'continue' statement ignoring the loop counter increment in 'while' loop, but not in 'for' loop?
body: <p>Why does it tend to get into an infinite loop if I use <code>continue</code> in a <code>while</code> loop, but works fine in a <code>for</code> loop?<br>
  The loop-counter increment <code>i++</code> gets ignored in <code>while</code> loop if I use it after <code>continue</code>, but it works if it is in <code>for</code> loop.</p>
  
  <p>If <code>continue</code> ignores <em>subsequent</em> statements, then why doesn't it ignore the third statement of the <code>for</code> loop then, which contains the counter increment <code>i++</code>? Isn't the third  statement of <code>for</code> loop <em>subsequent</em> to <code>continue</code> as well and should be ignored, given the third statement of <code>for</code> loop is executed <em>after</em> the loop body?</p>
  
  <pre><code>while(i&lt;10)   //causes infinite loop
  {
      ...
      continue
      i++
      ...
  }
  
  for(i=0;i&lt;10;i++)  //works fine and exits after 10 iterations
  {
      ...
      continue
      ...
  }
  </code></pre>