Advertisement
Guest User

Untitled

a guest
Oct 24th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<ctype.h>
  3. #include<stdlib.h>
  4.  
  5.  
  6. int main()
  7. {
  8. FILE *pf1,*pf2;
  9. int a;
  10.  
  11. pf1=fopen("file1.txt","r");
  12.  
  13. pf2=fopen("file2.txt","w");
  14.  
  15. if(pf1)
  16. {
  17. do{
  18. a=fgetc(pf1);
  19. if(isgraph(a)) fputc(a,pf2);
  20. }while(a!=EOF);
  21. }
  22.  
  23.  
  24. fclose(pf1);
  25. fclose(pf2);
  26.  
  27.  
  28.  
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement