Question: 1. Create a program that copies the data from one file to another while converting all characters matching the search key with that of the

 1. Create a program that copies the data from one file

1. Create a program that copies the data from one file to another while converting all characters matching the search key with that of the replace key. Your program should accept four arguments: (a) input filename (b) output filename (c) search character (d) replace character Warn the user if the input file does not exist. Your program should check to make sure the output file does not already exist. If it does, print "DESTINATION FILE EXISTS." to stdout. Print the number of characters changed to stdout using the format string "%d characters changed." The search and replace characters are case-sensitive. Save your code as search_and_replace.c. Example Run $ ./a.out input.txt output.txt A d 15 characters changed

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!