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.