title: How to create custom filenames in C?
body: <p>Please see this piece of code:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  #include&lt;stdlib.h&gt;
  
  int main() {
      int i = 0;
      FILE *fp;
      for(i = 0; i &lt; 100; i++) {
          fp = fopen("/*what should go here??*/","w");
          //I need to create files with names: file0.txt, file1.txt, file2.txt etc
          //i.e. file{i}.txt
      }
  }
  </code></pre>