All pastes #446958 Raw Edit

Mine

public text v1 · immutable
·published 2007-04-18 19:17 UTC
rendered paste body
#include <stdio.h>
#include <string.h>
#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();
}