Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c programming 2. Concatenate two files (lastnameCAT.C) Write a C program (call it lastname Cat) that, given two input files (file and file2), it adds

c programming image text in transcribed
2. Concatenate two files (lastnameCAT.C) Write a C program (call it lastname Cat) that, given two input files (file and file2), it adds their contents and place the results into a new file (file3). The command takes a flag that determines how the files will be added. The command accepts only the following flags: -s': start with file1 o'e': end with file1 Note: All labs are due before next week's lab starts Lab 04 CIS 370 Due: Week of 2/22/2021 for examples and given the following files: file contains: "This is the content of file 1." file contains: "This is the content of file 2." The following command will create files: $lastnameCAT -s filel file2 file3 file contains: This is the content of file 1. This is the content of file 2. While the following command will create file3: $last nameCAT -e filel file2 file3 file contains: This is the content of file 2. This is the content of file 1. Your command should print proper error messages in case the user does not give the command the right number of arguments or the wrong flag (anything other than '-s'or'e'); SlastnameCAT -e file2 filel Error! Usage: MyCat file1 file2 file3 $lastnameCAT -q file2 filel file Error! Usage: you should use either's' or 'e' then the file names

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

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions