#include #include #include int main(int argc, char const *argv[]) { FILE *f; f=fopen(argv[1],"r"); char * buffer = NULL; size_t x=0; int y=0; while((getline(&buffer,&x,f))!=-1) { printf("%06d ",y); printf("%s",buffer); y++; } fclose(f); printf("\n"); }