Question: C programming 1. (20 points) Write a C program that finds and outputs words in a text file. The program should get the names of

C programming
 C programming 1. (20 points) Write a C program that finds
and outputs words" in a text file. The program should get the

1. (20 points) Write a C program that finds and outputs words" in a text file. The program should get the names of the input and output files from its command-line arguments (not by prompting the user as most of our programs have done) and should print appropriate error messages if fewer than two command-line arguments are given or if it cannot open the specified files. The input file can contain any characters- alphabetic, numeric, punctuation, etc. - but the output file should contain only the words" (sequences one or more alphabetic characters), each on a separate line, in lowercase. The program should also print (to standard output) the number of alphabetic characters and the number of total characters in the input file. So for example if file words-in.txt contains the following: hello vorld HELLO AGAIN and some numbers 1234 vords, words, words,words calling the program with the command ./a.out words-in.txt words-out.txt should print the line 54 alphabetic characters, 72 characters in all and produce a file words-out.txt containing the following: hello vorld hello again and some numbers worda words worda words Since the logic for this program is a little tricky, I recommend that you start by writing a simpler but somewhat similar program that just converts alphabetic characters to lowercase, copies newline characters unchanged, and converts all other characters to spaces. If you can't figure out the full problem, you can turn in this simpler program for part credit

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!