Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Write a C program to run on ocelot to find the 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 enter the string right after running the command. You must use getopt to parse the command line.

Usage: words [l] [s] [filename]

The l flag means to find the longest and the s option means to find the shortest. You may have both or one of the flags. Output should be well formatted and easy to read. Code should be nicely indented and commented. Create a simple Makefile to compile your program into an executable called words.

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

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions