Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void encode_file(FILE *, FILE *);
- int main()
- {
- FILE *in_file, *out_file;
- char infile_name[81], outfile_name[81], input;
- printf("Enter the name of the file to encode: ");
- scanf("%s", infile_name);
- if ((in_file = fopen(infile_name, "r") ) == NULL)
- {
- printf("Error opening %s\n", infile_name);
- }
- printf("Enter the output file name: ");
- scanf("%s", outfile_name);
- if ((out_file = fopen(outfile_name, "w") ) == NULL)
- {
- printf("Error opening %s\n", outfile_name);
- }
- encode_file(in_file, out_file;
- printf("The file has been encoded.\n");
- fclose(in_file);
- fclose(out_file);
- }
Add Comment
Please, Sign In to add comment