int main(int argc, char *argv[]) { FILE* inputFile = fopen(argv[1], "r"); FILE* outputFile = fopen(argv[2], "w"); // malloc // read from input file // calculate // write to output file fclose(inputFile); fclose(outputFile); }
int main(int argc, char *argv[]) { FILE* inputFile = fopen(argv[1], "r"); // file is opened? // malloc // read from input file fclose(inputFile); // calculate FILE* outputFile = fopen(argv[2], "w"); // file is opened? // write to output file fclose(outputFile); }
Last updated 11 days ago