Write a function longestWordInLine () that takes two parameters:
-name1, an input file name containing words and white spaces
-name2, an output file name
For each line in the input file, the function writes to the output fle the longest word. If more than one such word exists, write the last one.
For example, if input file contains:
It is what it is
python is fun
finals are coming soun
the content of the outpul fle will be
what
pythor
coming