Question: Write in C++ - Design a function that will read and search the file random file.txt. There are 100 integer values in this file. Your
Write in C++
- Design a function that will read and search the file random file.txt. There are 100 integer values in this file. Your function should use the most efficient searching algorithm that can be used with this file. Your function should take the search target as a parameter. Your function should return true if the target is in the file, and false otherwise. "Sketch" your function in comments before writing any code. - Write a main function that includes several calls to the function you have designed with different these inputs: 401, 248, 5, 525, 3. You should predict the return of each function and make a note of your prediction in a comment. - Implement the function you designed. - Submit the .cpp file with your code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
