Computer Science, asked by SRIDHAR7554, 10 months ago

Difference between sequential and random access files in c++

Answers

Answered by Anonymous
1

Answer:

Hey!

On the other hand, Random Access to a file means that the computer system can read or write information anywhere in the data file. ... Sequential access has advantages when you access information in the same order all the time. Also is faster than random access

Answered by Anonymous
1

Sequential access must begin at the beginning and access each element in order, one after the other. Direct access allows the access of any element directly by locating it by its index number or address. Arrays allow direct access. Magnetic tape has only sequential access, but CDs had direct access. If you are on a railroad train, to go from one car to another you must use sequential access. But when you board the train initially you have direct access. Direct access is faster than sequential access, but it requires some external mechanism (array index, file byte number, railroad platform).

Similar questions