(1) Write a program that prompts a user for a filename of an existing file that contains 10 lines of student names. Assume that names are of equal length and they are inserted into a file based on the order of the student’s ID. The IDs are from 1-10 and thus the order of the student in the file is his/her ID. Next, the program reads the filename, reads the student ID and then seeks to the line that contains the student name, reads it byte by byte and writes it into a new output file.
(Note: create the input file before you run the program)
it should be done in seek method (seekg)
(2) Write a program that prompts a user for a filename of an existing file that contains 10 lines of student names of equal lengths and the name of student to be searched. Next, the program search for the name using binary search within the file (NOT in main memory) and indicates whether the name exist or not.