Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

Students also viewed these Databases questions

Question

What are the objectives of Human resource planning ?

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago