title: C, Eliminating loop when calling fread?
body: <p>In C I wrote this code:</p>
  <pre><code>char tmp[strlen(argv[1]) + 1];
  for (int j = 0; j &lt; strlen(argv[1]) + 1; ++j) {
      fread(&amp;tmp[j], 1, 1, file);
  }
  </code></pre>
  <p>I prefer to eliminate the for loop to make the code shorter so is it equal to this (option A):</p>
  <pre><code>char tmp[strlen(argv[1]) + 1];
  fread(&amp;tmp, 1, strlen(argv[1]) + 1, file);
  </code></pre>
  <p>and this (option B):</p>
  <pre><code>char tmp[strlen(argv[1]) + 1];
  fread(&amp;tmp, strlen(argv[1]) + 1, 1 ,file);
  </code></pre>
  <p>From what I read on <code>fread</code> the answer is yes for both but want to understand what's preferable A or B?</p>