Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. /*
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. int main()
  6. {
  7. printf("Hello world!\n");
  8. return 0;
  9. }
  10. */
  11.  
  12. #include<stdio.h>
  13. #include<ctype.h>
  14. int main(int argc, char** argv){
  15. FILE * f1, * f2;
  16. int ch;
  17. f1= fopen (argv[1], );
  18. f2= fopen (argv[2], "w");
  19. if ( f1==0 || f2==0) {
  20. puts (" Eroare la deschidere fişiere \n");
  21. return 1;
  22. }
  23. while ( (ch=fgetc(f1)) != EOF) // citeste din f1
  24. fputc ( tolower(ch),f2); // scrie în f2
  25. fclose(f1);
  26. fclose(f2);
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement