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:20
Consider the following statements, then select one of the answers below: the signal() function shown below registers "sig_handler()" as the signal handler function for the sigkill signal, without the complexity of using when the sigkill signal is sent to a process running this code, by a user typing "kill -kill ", where the correct process id is used for to target the process, sig_handler() will be executed.
Answers: 1
question
Computers and Technology, 23.06.2019 00:20
Ihave been given the number of guns per 100, and the total firearm-related deaths per 100,000. i have to find the actual number of guns per country and actual number of gun-related deaths. if somebody could show me how to do 1 question, i can finish the rest, i am just confused. tia
Answers: 3
question
Computers and Technology, 23.06.2019 23:00
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a.add symmetry b.create a unified publication c.provide consistency d.save money
Answers: 1
question
Computers and Technology, 24.06.2019 08:00
Java the manager of a football stadium wants you to write a program that calculates the total ticket sales after each game
Answers: 1
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
Computers and Technology, 08.03.2021 20:00
question
Mathematics, 08.03.2021 20:00
Questions on the website: 13722361