What you need to accomplish in this lab:

Open any text file (e.g., a source code file of your previouse labs or assignments) with at least 3000 characters, load the content into a char array.

Interactively ask the user to enter a string of about 20 characters, then search the loaded char array to find the first match. Display the same length string before the matched string (or to the beginning of the file), the matched string itself, and same lenth string after the matched string (or to the end of the file) in the document.

For example, if the file starts with:

Policies and procedures at Vancouver Island University reflect
"Governance in Action." They connect the university's mission to
the everyday actions of its community, clarify the university's
expectations of its members, mitigate institutional risk, enhance
efficiency, and support the university's compliance with
laws and regulations.

and the user enters university's mission, then your program should show ." They connect the university's mission to the everyday act.

If the user enters Policies, then your program should show Policies and pro.

Brute force algorithm can do the job. But you are encouraged to try at least one of the Boyer-Moore algorithm or Knuth-Morris-Pratt algorithm to improve execution time efficiency.

Submit your work using the submit name Lab9.