Name: ____________________________________________________ Alpha: _____________________

Describe help received: _________________________________________________________________

  1. [100pts] Write a program that works as follows:
    1. It reads in lower-case words, ending with the word "END"
    2. Then, it stores them in a linked list.
    3. Then, it reads in a single letter.
    4. Then, it prints out all words that start with that letter, in reverse order from how they were read in.
    Example runs:
    ~/$ ./hw
    Enter words followed by END:
    one two three four five six seven eight END
    What letter? t
    three
    two
    
    Tip: For the above run, try to draw the shape of the list on a piece of paper when the input strings are read.
    ~/$ ./hw
    Enter words followed by END:
    aa ab ac ad END
    What letter? a
    ad
    ac
    ab
    aa
    
    ~/$ ./hw
    Enter words followed by END:
    aa ab ac ad END
    What letter? b
    

    Turn In a printout of your source code along with a screen capture showing the above runs of your program.