title: 2GB limit on file size when using fwrite in C?
body: <p>I have a short C program that writes into a file until there is no more space on disk:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void) {
    char c[] = "abcdefghij";
    size_t rez;
    FILE *f = fopen("filldisk.dat", "wb");
    while (1) {
      rez = fwrite(c, 1, sizeof(c), f);
      if (!rez) break;
    }
    fclose(f);
    return 0;
  }
  </code></pre>
  
  <p>When I run the program (in Linux), it stops when the file reaches 2GB.</p>
  
  <p>Is there an internal limitation, due to the FILE structure, or something?</p>
  
  <p>Thanks.</p>