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 15:00
When designing content as part of your content marketing strategy, what does the "think" stage represent in the "see, think, do, care" framework?
Answers: 3
question
Computers and Technology, 22.06.2019 18:00
What is the first view you place in your drawing?
Answers: 1
question
Computers and Technology, 22.06.2019 22:40
Least square fit to polynomial write a function leastsquarefit3pol that solves a linear system of equations to find a least squares fit of a third order polynomial to an experimental data set given as two row arrays. the function leastsquarefit3pol must explicitly solve a set of linear equations and cannot use polyfit. there should be no restriction on the size of the problem that can be solved.
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
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, 17.12.2020 21:00
question
Mathematics, 17.12.2020 21:00
question
Biology, 17.12.2020 21:00
question
History, 17.12.2020 21:00
Questions on the website: 13722363