23 Novembre

This commit is contained in:
Adrian POURCHOT 2022-11-23 16:46:05 +01:00
parent 1ed4aa94d6
commit aca1866b8e
5 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argn , char** const argv) {
if ((strcmp(argv[1],"-a"))!=0){
FILE *f;
FILE *l;
int octet;
f=fopen(argv[3],"a");
l=fopen(argv[2],"r");
fread(&octet,1,1,l);
while (!(feof(l))){
fwrite(&octet,1,1,f);
fread(&octet,1,1,l);
fclose(l);
fclose(f);
}
}
return 0;
}

View File

@ -0,0 +1 @@
Ceci est un test de copie

View File

@ -0,0 +1 @@
ceci est la copie à rajouté.

View File

@ -0,0 +1,22 @@
#include <stdio.h>
#include <stdlib.h>
int main(void) {
FILE *f;
int i;
int j;
int score;
char nom[4];
f=fopen("top10","r");
for (i=0;i<10;i++){
fread(&score,4,1,f);
printf("%09d",score);
fread(nom,1,3,f);
printf(" ");
for (j=0;j<4;j++){
printf("%c",nom[j]);
} printf("\n");
}
fclose(f);
return 0;
}

BIN
DEV1.1/TP13:Fichiers/top10 Normal file

Binary file not shown.