Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer in C (This is all the information provided.) e2q1.c - This program will accept two command-line arguments: an input filename an integer T Example

Answer in C (This is all the information provided.)

e2q1.c - This program will accept two command-line arguments:

  1. an input filename
  2. an integer T
  • Example run command: ./a.out in.txt 4

The program will create two files:

  1. big.txt contains all tokens from the input file with length greater than or equal to T
  2. small.txt contains all tokens from the input file with length less than T
  • A token is a group of characters surrounded by whitespace.
  • Each token should appear on its own line in the output file in order of appearance.
  • Assume valid input and that no token will be more than 100 characters.
  • If you create your own test input file, make sure to end the file with an empty newline.
  • Follow the standard read pattern.
  • Close all files.

Example: ./a.out in.txt 4

image text in transcribed

in.txt (given) big.txt (created) small.txt(created) 5 The sun did not shine. shine. 6 It was too wet to play. play. 7 So we sat in the house house 8 All that cold, cold, wet day that cold, cold, day. 5 The sun did not 6 It was too wet to 7 So we sat in the 8 All wet

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_2

Step: 3

blur-text-image_3

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

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

What are the purposes of promotion ?

Answered: 1 week ago

Question

2. Show the trainees how to do it without saying anything.

Answered: 1 week ago