1. wsort.c: Write a C program that reads words from stdin and uses an insertion sort function to sort the words in increasing order by word size. For this problem, a word is 1 or more consecutive letters, either lower- or uppercase, separated by any other characters. Print the sorted list to stdout.

2. filter.c: Write a C program that reads a list of newline-separated words (already sorted in increasing size) from stdin and uses binary search to filter out words by using command line arguments -l and -g. You must handle an arbitrary number of input words and you must use binary search to find your endpoints. Print your filtered list to stdout .

Examples:

filter -l 10 -g 5
filter -g 5 -l 10
both print all words bigger than 5 chars long, but less than 10 chars
filter -l 15
print all words less than 15 characters long
filter -g 7
print all words greater than 7 characters long
filter
print all words in original list.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.