DEV/DEV1.1/TP12/copiercoller.c

22 lines
296 B
C
Raw Normal View History

2022-11-23 16:43:26 +01:00
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char const *argv[])
{
FILE *f;
f=fopen(argv[1],"r");
FILE *o;
o=fopen(argv[2],"w");
int n;
while(!feof(f)==1)
{
if(!feof(f)==1)
{
fread(&n,1,1,f);
fwrite(&n,1,1,o);
}
}
fclose(o);
fclose(f);
}