Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is programming in C (4 points) This program randomly combines words contained in its input stream and sends them to the output stream. At

image text in transcribed

this is programming in C

(4 points) This program randomly combines words contained in its input stream and sends them to the output stream. At program execution, the application shall read in the entire set of words to use during the combination process. After reaching the EOF symbol, the program shall then begin randomly selecting words and combining them into a concatnated output word. By default, the program produces only one combined output word for each execution, but users behavior by providing an optional command line argument(through argy) The words the program selects must meet minimum length criteria, and users may also change this value at program execution to meet their needs. The program must accept this. By default, the program squeezes the words together and omits any spacing between them (e.g., somewhatlikethisbutrandom), but users may override this behavior with a command line argument as well, and the program will produce output with the user specified parameter. The command line arguments may appear in any order When unable to construct strings meeting the minimum length from the input stream, the program shall alert the user to an error and suggest corrective action. There shall be no duplicate words in any single output combination, but the same word may appear twice in the total output when producing more than one string (i.e. -n specified >1) Program Name: crunch Command Line Args:-d Number of words from input stream to combine in each crunched output (default -4) -m The minimum length of each word used (default -6) -n Number of output strings to produce (default -1) -s Indicates to insert a space between the output words (default-none) Program Input: stdin Program Output: stdout Return 0 on completion Allowed Imports: stdio.h stdlib.h time.h Example Use: userecomputer: s ./crunch 1) Program Name: crunch Command Line Args:-d Number of words from input stream to combine in each crunched output (default -4) -m The minimum length of each word used (default -6) -n Number of output strings to produce (default -1) -s Indicates to insert a space between the output words (default-none) Program Input: stdin Program Output: stdout Return 0 on completion Allowed Imports: stdio.h stdlib.h time.h Example Use: userecomputer: s ./crunch

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

Real Time Database Systems Architecture And Techniques

Authors: Kam-Yiu Lam ,Tei-Wei Kuo

1st Edition

1475784023, 978-1475784022

More Books

Students also viewed these Databases questions

Question

=+3. How is the product/service generally perceived?

Answered: 1 week ago

Question

Understanding Group Leadership Culture and Group Leadership

Answered: 1 week ago