Question: Functional Requirements Write a program that opens a file for reading, and writes its contents to an output file, but the alphabetic ASCII characters have

Functional Requirements

Write a program that opens a file for reading, and writes its contents to an output file, but the alphabetic ASCII characters have their case transposed: uppercase letters are copied as lowercase, and vice versa. Any other byte values are simply copied. The command expects 3 command line arguments: the pathname of the source file, the pathname of the destination file, and the permissions to be set on the destination file, expressed as 3 octal digits. If the target cannot be created (it already exists, or you lack permissions on that directory) display an error message and end.

ale: ./a.out source.txt target.txt 755

Non-functional Requirements

You may only use basic POSIX I/O and C libraries. Use a buffer size of 64 bytes for both read and write operations. Be sure to test/demonstrate your program an a text file bigger than 64 bytes in size.

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!