Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program to run on ocelot to find the total count of words and optionally the longest and or shortest words in a

image text in transcribed

Write a C program to run on ocelot to find the total count of words and optionally the longest and or shortest words in a string input by the user or coming from a file. If there is no filename the user would be prompted to enter the string. You must use getopt to parse the command line. The string would not be input on the command line. Usage: countwords [- [-s] [filename] The I flag means to find the longest word in the string. The s option means to find the shortest word in the string. You may have both or one of the flags. Output should be well formatted and easy to read. The source file should have your name & PantherlD included in it, a description and it should have the affirmation of originality. Code should be nicely indented and commented. Create a simple Makefile to compile your program into an executable called countwords. Submit this assignment in Blackboard. You should submit the source code and your Makefile compressed into a zip file named FirstNameLastNameL3.zip. The Makefile should be called Makefile with no extension. I should be able to type make at the command line to compile your program. Do not include any other files or folders in the zipfile. This applies even if you are a Mac user. If the program does not compile and do something useful when it runs it will not earn any credit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Big Data Interview 751 Comprehensive Questions And Expert Answers

Authors: Mr Bhanu Pratap Mahato

1st Edition

B0CLNT3NVD, 979-8865047216

More Books

Students also viewed these Databases questions

Question

=+4. Was it the first product in its industry?

Answered: 1 week ago