close
#include
#include
#include
 void main (void)
 {
  FILE *rptr, *wptr;
 char string[80];
 if((rptr=fopen("input.txt","r"))==NULL)
  { printf("The input file can not be opened !\n");
   exit(1);
 }
else
 printf("The input file can be opened !\n");
if((wptr=fopen("output.txt","w"))==NULL)
{
 printf("The output file can not be opened !\n");
 exit(1);
}
else
 printf("The output file can be opened !\n");
while(fscanf(rptr,"%s",string)!=EOF)
{
 printf("%s", string);
 fpintf(wptr,"%s\n", string);
}
 fclose(rptr);
 fclose(wptr);
 }
arrow
arrow
    全站熱搜

    sat9027633 發表在 痞客邦 留言(0) 人氣()