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 14:30
Create a pseudocode design to prompt a student for their student id and the titles of the three classes they want to add. the solution should display the student’s id and a total bill. • bill a student using the following rules: o students can only add up to 3 classes at a time.
Answers: 3
question
Computers and Technology, 23.06.2019 03:50
Q-1 which of the following can exist as cloud-based it resources? a. physical serverb. virtual serverc. software programd. network device
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
Which best explains why a digital leader would join a society specializing in technology
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Jake really works well with numbers and is skilled with computers but doesn't work well with others. which of the jobs discussed in this unit might be best for jake? why?
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
Chemistry, 29.09.2019 05:00
question
Mathematics, 29.09.2019 05:00
question
Mathematics, 29.09.2019 05:00
Questions on the website: 13722361