subject

Problem F. Assuming a file consists of fixed-length logical records, whose type is defined as t_record. The operating system only supports sequential-access to files via the following three system calls. t_record *read_next() // read the next record pointed to by the file pointer, advance the file pointer by one record, // and return a pointer pointing to the record read from the file
void write_next(t_record rec) // write the record rec to the location pointed to by the file pointer, // and advance the file pointer by one record
void reset() //reset the file pointer to the beginning of the file
WRITE pseudo code in C to implement the following two functions to simulate direct access read and write operations on this operating system that only supports sequential-access to files. (Hint: there is no guarantee on where the file pointer is when any one of the following two functions is called.)
t_record *read(int n) // read the n-th record in the file, and return a pointer pointing to the record read void write(int n, t_record rec) // write the record rec to the file as the n-th record

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:30
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
What is estimated time of arrival (eta)? a device that measures the acceleration (the rate of change of velocity) of an item and is used to track truck speeds or taxi cab speeds a gps technology adventure game that posts the longitude and latitude location for an item on the internet for users to find a north/south measurement of position the time of day of an expected arrival at a certain destination and is typically used for navigation applications
Answers: 3
question
Computers and Technology, 23.06.2019 14:00
In which job role will you be creating e-papers, newsletters and preiodicals
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
1. ask the user how many questions are in the quiz. 2. ask the user to enter the key (that is, the correct answers). there should be one answer for each question in the quiz, and each answer should be an integer. e.g., 34 7 13 100 81 3 9 10 321 12 might be the key for a 10-question quiz. you will need to store the key in an array. 3. ask the user to enter the answers for the quiz to be graded. there needs to be one answer for each question. note that these answers do not need to be stored; each answer can simply be compared to the key as it is entered. 4. when the user has entered all of the answers to be graded, print the number correct and the percent correct. 5. add a loop so that the user can grade any number of quizzes with a single key. after the results have been printed for each quiz, ask "grade another quiz? (y/n)." note: you only have one array (the key). you are not creating a new key for each set of quiz answers.
Answers: 3
You know the right answer?
Problem F. Assuming a file consists of fixed-length logical records, whose type is defined as t_reco...
Questions
question
Mathematics, 13.07.2020 21:01
question
Mathematics, 13.07.2020 21:01
question
Spanish, 13.07.2020 21:01
question
Biology, 13.07.2020 21:01
question
Mathematics, 13.07.2020 21:01
Questions on the website: 13722363