#include #include #define ROZ_T 100 #define ROZ 1024 main() { char w[ROZ],*list[ROZ_T]; FILE *plik=fopen("1.txt","r"); int i; for(i=0;!feof(plik);i++) { fgets(w,ROZ,plik); list[i]=malloc(sizeof(*w)*(strlen(w))); strcpy(list[i],w); } fclose(plik); fopen("1.txt","w"); for(i-=2;i>=0;i--) fputs(list[i],plik); //getchar(); }