/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <stdio.h>

int main(int argc,char *argv[])
{
   char line[1025];
   FILE *fp1,*fp2;
   fp1 = fopen("tst.txt", "r");
   fp2 = fopen("tst2.txt", "w");
   while(fgets(line,sizeof(line),fp1))
   {
      fputs(line,fp2);
   }
   fclose(fp1);
   fclose(fp2);
   return 0;
}

