As part of this work you are required to implement a management plan
binary files (binary files) that contain variable format recordings:
name <space> surname
The program will accept the name of a binary file whenever it contains it
the registrations are sorted by brand name. It will also accept the name of one
a second binary file, being [login to view URL], containing integers which
correspond to the first byte of each record in the above binary ([login to view URL]).
For example, be the following.
The [login to view URL] position will have the following values:
0 4 12
(the last value is entered for ease of writing).
Then the program should display a menu with the following options:
1. Insert: The user gives the name and surname separated by a space as one
string. Then the new record is inserted into the [login to view URL] file so that
records to remain sorted. It should also be updated
[login to view URL] file accordingly.
If you want to implement a simpler version of insert, always insert the records in
end of file.
2. Delete: The user gives the name and surname separated by a space as one
string. If the name exists in the [login to view URL] file, it will be deleted
so that its entries remain sorted.
It should also be updated
and the [login to view URL] file accordingly. If there is no record it will appear appropriate
3. Search: The user gives the last name they are looking for. You are required to implement binary
search. If the last name is found the corresponding entry will be displayed, otherwise it will
an appropriate message is displayed.
If you want to implement a simpler version of search, you can
4. Display: Display all records of the file.
• The game should be implemented in a Linux environment.
• The files must be accessed using system calls
(not using library functions <stdio.h>). For example
you cannot use the function to open your file
fopen () of <stdio.h> .Open () system call should be used
<fcntl.h>. If an error occurs, the program must terminate after first
print an appropriate message.
• When importing a record, both files should be expanded
appropriate. Accordingly, when deleting both files you should
are reduced appropriately
Implement the individual functions of the program (insert, delete, search and
display) in separate functions.