Question: For this project you will create a utility that will take as its parameters two filenames. The two filenames will be an input file and

 For this project you will create a utility that will take

For this project you will create a utility that will take as its parameters two filenames. The two filenames will be an input file and an output file. The usage from the command line will look like this: /reverse INPUT_FILENAME OUTPUT_FILENAME When the program completes, the input file will have all of its text written in reverse to the output file. The following criteria should help you in creating this utility: You will need a file_utils.h file with your function signatures, include guards, etc. It will include two functions int read_file( char* filename, char *buffer ); int write_file( char* filename, char *buffer, int size) DO NOT CHANGE THESE FUNCTION SIGNATURES IN ANY WAY! You will need a file_utils.c file with your code implemented. You will need a reverse.c file with code that accepts command arguments, includes a main function, and calls the functions from the included files. C doesn't have exceptions so you must create exception handling on your own. You must perform checks to make sure that memory allocation calls complete correctly and that file read/write operations complete correctly. Use fprintf( stderr, "ERROR MESSAGE" to print error messages. This will send them to the error stream instead of the standard output stream. For this project you will create a utility that will take as its parameters two filenames. The two filenames will be an input file and an output file. The usage from the command line will look like this: /reverse INPUT_FILENAME OUTPUT_FILENAME When the program completes, the input file will have all of its text written in reverse to the output file. The following criteria should help you in creating this utility: You will need a file_utils.h file with your function signatures, include guards, etc. It will include two functions int read_file( char* filename, char *buffer ); int write_file( char* filename, char *buffer, int size) DO NOT CHANGE THESE FUNCTION SIGNATURES IN ANY WAY! You will need a file_utils.c file with your code implemented. You will need a reverse.c file with code that accepts command arguments, includes a main function, and calls the functions from the included files. C doesn't have exceptions so you must create exception handling on your own. You must perform checks to make sure that memory allocation calls complete correctly and that file read/write operations complete correctly. Use fprintf( stderr, "ERROR MESSAGE" to print error messages. This will send them to the error stream instead of the standard output stream

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!