How to create and open many files using c program ? (say n files)

616 views Asked by At

I need to know how to create many empty files and open them simultaneously using a c program.

1

There are 1 answers

0
Rupsingh On
FILE *fp[n];
for(i=0;i<n;i++)
{
  fp=fopen("filename","mode");

  /*Do What you want with these files....*/

  fclose(fp);
}