APL/Révisions/Fichiers/copie.c
2022-01-25 12:00:33 +01:00

18 lines
358 B
C

#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[]) {
FILE* f = fopen(argv[1], "r");
FILE* f2 = fopen(argv[2], "w");
if (f && f2) {
while (!feof(f)) {
char c;
fread(&c, sizeof(char), 1, f);
fwrite(&c, sizeof(char), 1, f2);
}
fclose(f);
fclose(f2);
}
}