...

char filename[20];

for(i = 0; i < 10; i++) {

  sprintf(filename, "/tmp/file%d.tmp", i);

  file[i] = open(filename, O_RDWR,O_CREAT,0644);

...