I'm wondering if there is a better way of closing file pointers that are in a array other than having a for loop go through the array:
argc -= optind; argv += optind;
FILE *inputfiles[argc - 1];
int i;
for (i = 0; i < argc; i ++)
inputfiles[i] = fopen(argv[i], "r");
fnctn(inputfiles);
int f;
for (f = 0; f < argc; f++)
fclose(inputfiles[f]);