#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]){
if(argc < 2){
printf("Usage %s file\n", argv[0]);
exit(1);
}
FILE *fp, *fd;
fp = fopen(argv[1], "r");
fd = fopen("output.txt", "w");
int ch;
while ( (ch = fgetc(fp)) != EOF ) {
fputc(ch, fd);
}
fclose(fp);
fclose(fd);
return 0;
}