(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.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment