subject

Write a c program to run on ocelot to read a text file and print it to the display. it should optionally find the count of the number of words in the file, and/or find the number of occurrences of a substring, and/or take all the words in the string and sort them lexicographically (ascii order). you must use getopt to parse the command line. there is no user input while this program is running. usage: mywords [-cs] [-f substring] filename • the -c flag means to count the number of words in the file. a word would be a series of characters separated by spaces or punctuation. a word could include a hyphen or a single apostrophe. • the -s option means to print the words in the file sorted by ascii order. • the -f option will find the number of occurrences of the given substring. • you may have any number of the flags included or none of them. • the order they should be run would be: -s first, -c second, and -f third. • output should be well formatted and easy to read. the source file should have your name & pantherid, a description and it should have the affirmation of originality included in a comment at the top. code should be nicely indented and commented. create a simple makefile to compile your program into an executable called mywords.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:00
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 3
question
Computers and Technology, 24.06.2019 09:00
Technician a says that a new replacement part is always good. technician b says that sometimes recent repair work will be the cause of a complaint. who is correct? a. both technicians a and b b. technician a c. technician b d. neither technician a nor b
Answers: 3
question
Computers and Technology, 24.06.2019 10:30
This device directs network traffic. bridge hub nic repeater router switch
Answers: 3
question
Computers and Technology, 24.06.2019 17:30
Looking at the electroscope, describe how you can cause the two leaves at the bottom to repel each other and stay that way
Answers: 3
You know the right answer?
Write a c program to run on ocelot to read a text file and print it to the display. it should option...
Questions
question
Biology, 18.08.2019 10:20
question
Mathematics, 18.08.2019 10:20
question
Mathematics, 18.08.2019 10:20
question
Chemistry, 18.08.2019 10:20
question
Mathematics, 18.08.2019 10:20
Questions on the website: 13722363