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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:10, yqui8767
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
image
Computers and Technology, 24.06.2019 03:00, 2020IRodriguez385
With editing, word automatically displays a paste options button near the pasted or moved text. a. cut-and-paste b. drag-and-drop c. inline d. copy-and-carry
Answers: 1
image
Computers and Technology, 24.06.2019 13:30, livie225
Type the correct answer in the box. spell all words correctly. what is the default margin width on all four sides of a document? by default, the document has a margin on all four sides.
Answers: 1
image
Computers and Technology, 25.06.2019 00:10, dnicole43
Select the correct answer sarah wants to use a device to input signatures on electronic documents. which input device will be most suitable for her? a digital pen b. laser pen c keyboard d. touchscreen reset next
Answers: 2
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 in other subjects:

Konu
English, 04.12.2019 09:31