FANDOM



#include <stdio.h>

int
main(void)
{
 FILE *infilep;
 FILE *outfilep;
 char c;
 int status;
 status = 0;

infilep = fopen("/home/kjduke/Junkfile", "r");
outfilep = fopen("Cleanfile", "w");
while (EOF != status)
 {
   status = fscanf(infilep, "%c", &c);
   if (c== '\t')
     fprintf(outfilep, "   ");
 else if (c== '\n')
   {}
  else
    fprintf(outfilep, "%c", c );
 }
fclose(infilep);
fclose(outfilep);
return 0;
}