Guest User

Untitled

a guest
Jul 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. void encode_file(FILE *, FILE *);
  2. int main()
  3. {
  4. FILE *in_file, *out_file;
  5. char infile_name[81], outfile_name[81], input;
  6. printf("Enter the name of the file to encode: ");
  7. scanf("%s", infile_name);
  8. if ((in_file = fopen(infile_name, "r") ) == NULL)
  9. {
  10. printf("Error opening %s\n", infile_name);
  11. }
  12. printf("Enter the output file name: ");
  13. scanf("%s", outfile_name);
  14. if ((out_file = fopen(outfile_name, "w") ) == NULL)
  15. {
  16. printf("Error opening %s\n", outfile_name);
  17. }
  18. encode_file(in_file, out_file;
  19. printf("The file has been encoded.\n");
  20. fclose(in_file);
  21. fclose(out_file);
  22. }
Add Comment
Please, Sign In to add comment