#include #include #include int main(int argc, char *argv[]) { char tampon[256]; FILE *flot; int i = 1; if (argc != 2) return EXIT_FAILURE; if ((flot = fopen(argv[1], "r")) == NULL) { fprintf(stderr, "Impossible de lire %s\n", argv[1]); return EXIT_FAILURE; } while (fgets(tampon, sizeof tampon, flot) != NULL) printf("%04d: %s", i++, tampon); fclose(flot); return EXIT_SUCCESS; }