Write a spell checking tool that will identify all misspelled word in a text file using a provided dictionary.
The program will accept either one or two command line parameters.
1. The first command line parameter is the name of the text file that will be checked.
2. The optional second command line parameter is the name of the dictionary file – a file of words with one word per line. The default dictionary file is ref.txt.
The program will write out the misspelled words, one per line, in alphabetical order.
Extend the spell checking tool so that as well as identifying all misspelled words, the program will list the line numbers in the file where the incorrect spelling occurs.
The program will write out the misspelled words (one per line, in alphabetical order), followed by a tab character, followed by the list of line numbers in ascending order, on the same line, separated by a single space.