Question: 3 - Build the index: It asks the user to enter a database name ( a random - access file ) . It reads the

3- Build the index: It asks the user to enter a database name (a random-access file). It reads
the database records sequentially one at a time, and creates an ordered singly linked list in
the memory. Every node of the linked list will contain a pair (KEY, ADDRESS) as well as a
reference to a node, where KEY is the student ID and the ADDRESS is the position of the
record containing that ID in the database (the first record in the database is at position zero,
the second record is at position 1, and so on).
4- Display the index: It asks the user to indicate whether he/she wishes to see the entire index or
part of the index. If the entire index is desired, it displays all the keys starting with the key in the
first node and ending with the key in the last node. If only part of the index is desired, it prompts
the user to enter the starting key. It searches the ordered singly linked list to find the node
containing that key. If the search is successful, it displays every key beginning with the starting
key and ending with the key in the last node. Otherwise, it displays a message indicating the
failure of the search

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!