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, 22.06.2019 01:00
Search the web for two examples of digital art that you like. the examples must be from different mediums (example: one digital photo and one computer animation not two computer animations). compose an essay for each example you choose about why the piece appeals to you, and identify the medium used.
Answers: 1
question
Computers and Technology, 22.06.2019 03:00
Data is processed, stored, and transmitted as a series of 1s and 0s. each 1 or 0 is called a(n) . a series of eight 0s and 1s, called a(n) , represents one character—a letter, number, or punctuation mark. data becomes when it is presented in a format that people can understand and use. digital signals are represented by two different , such as +5 volts and +.2 volts. digital data can also take the form of light and dark spots etched onto the surface of a cd or the positive and negative orientation of particles on the surface of a hard disk. data consists of numbers that might be used in arithmetic operations. it can be represented digitally using the number system. data is composed of letters, symbols, and numerals that are not used in arithmetic operations. computers represent this type of data using , ebcdic, unicode, or utf-8. data is quantified using terms such as or kibibyte (1024 bytes), and prefixes such as or mebi (1,048,576), and giga or (1,073,741,824). to reduce file size and transmission times, digital data can be compressed. compression provides the means to compress data and reconstitute it into its original state. compression throws away some of the original data during the compression process. compressed files usually have at the end of the file name and are represented with special icons. these files have to be or unzipped before you can view the data they contain.
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
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
Business, 19.03.2021 01:00
question
Mathematics, 19.03.2021 01:00
question
Arts, 19.03.2021 01:00
question
Mathematics, 19.03.2021 01:00
question
Geography, 19.03.2021 01:00
question
Mathematics, 19.03.2021 01:00
Questions on the website: 13722363