Question5 Write a function CheckFile to check the spelling in an entire file. It
ID: 3726697 • Letter: Q
Question
Question5 Write a function CheckFile to check the spelling in an entire file. It should have the following parameters in the order provided: a string inputFile A string outputFile an array of strings correctWords the size of the array correctWords a 2D array of strings misspelledWords02) the number of rows in the misspeledWords array. Each line of the inputFile contains a single phrase. outFile will be createdlopened in function Your function should open the file and check the spelling of each line by calling CheckPhrase. Note: Your program should not call CheckPhrase for empty lines in the file. For example, if my inputFile was the one provided below testSpeliChecker.txt kiwi ocean bubbls bubbles ocn chickn lake kiwi per would expect the following to be appended to my outputFile unknown ocean unknown unknown unknown unknown lake unknown per Edge Conditions . Your program should print "invalid if you're not able to access your input file. . Your program should not call CheckPhrase for empty lines in the file.