Question: 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

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!