All pastes #732344 Raw Edit

Something

public text v1 · immutable
·published 2007-10-10 21:48 UTC
rendered paste body
/* 15. zadatak */
#include <stdio.h>
int main(int argc, char **argv)
{
   FILE *fin, *fout;
   int ch;
   
   if (argc != 2)
      return 1;
   fin = fopen(argv[1], "r");
   if (fin == NULL)
      return 1;
   fout = fopen(argv[1], "r+");
   if (fout == NULL)
      return 1;
   while ((ch = fgetc(fin)) != EOF) {
      if (ispunct(ch) || isdigit(ch) || (isalpha(ch) && islower(ch))) 
         fputc(' ', fout);
      else
         fputc(ch, fout);
   }
   printf("Done!\n");
   fclose(fin);
   fclose(fout);
   getche();
   return 0;
}