title: What does a 'for' loop without curly braces do?
body: <p>What does a <em>for</em> loop without any curly braces around it do?</p>
  <p>So from what I know, that during an if-statement only the first line of the code is executed. So in a for loop how does it work?</p>
  <p>I don't really understand the concept of a loop without the braces and with the braces. I guess an explanation with a piece of code would help. This is in C by the way. Here's a code I've been looking at as a reference.</p>
  <pre><code>int main(int argc, char* argv[])
  {
    int i;
    int count = 0;
    for (i = 0; i &lt; 5; i++)
      count++;
      printf(&quot;The value of count is: %d\n&quot;, count);
  
    return 0;
  }
  </code></pre>
  <p>In this case, I see that there is no curly braces, so I am assuming that it will just keep iterating the first statement until i &lt; 5 and once i is not less than 5 it doesn't do anything, but when I tested the code I get that it also ends up printing the printf statement. I thought that a loop without curly braces executed only the first line of code? Or am I missing something here.</p>