Developpement/23DEV1.1/TPS1/TP2/20-Fichier/Suite/Hexadecimal.c

27 lines
394 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char const *argv[])
{
FILE* f;
int i;
int n = 0;
int y;
char c[100];
f=fopen(argv[1],"r");
while(feof(f)==1){
for(i=0;i<y;i++){
if( c[i] ='\n'){
printf("\n");
n=n+10;
}else{
printf("%07d ",n);
fread(&c,3,1,f);
printf("%c ", c[i]);
}
}
}
fclose(f);
return 0;
}