answersLogoWhite

0


Best Answer

There is no difference in the files, only in the way they are accessed. Sequential files are accessed just like they sound, sequentially, which means the if you want to read something that starts at byte number 40,000, you have to read and ignore the first 39,999 bytes. Random-access files, however, allow you to go directly to the exact location you want.

Sequential access is normally used if the file is stored on a medium which doesn't allow random access. For example, if the file is stored on tape, you have to start reading from the beginning of the tape, until you get to the location you want. If you're using a hard disk, however, the head that reads and writes the disc can be moved directly to the portion of the file you want, making it faster to get the data you want.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

File constructed in a manner in which records may be placed in a random order; also called direct access file. Each record in a random access file has associated with it a relative index number. Whenever a record is read from a random access file, a computer program must produce a relative index number for this record in order to locate the record in the file. This type of file design offers the following

advantages:

(1) it provides rapid access to the desired information. In a decision-making environment where information is needed quickly, random access is a requisite to rapid retrieval;

(2) it is efficient for retrieving a relatively few records at a time; and

(3) it provides a method of keeping files up to date as transactions or events occur

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

During sequential access, if you want to access the nth byte of a file, you must read all bytes 0 through n.

During random file access, you may skip directly to the nth byte without having to read through all previous bytes.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Sequential access generally means you read or write data as a contiguous sequence of data elements, one after the other. You will generally begin reading or writing at the start of the file, and continue until the end of file marker is reached.

Random access means you navigate to any point in the file and begin reading or writing elements from that point in the file (usually sequentially), then navigate to another point in the file, and begin reading or writing from that point, and so on.

Random access is best suited to files where each data element is a consistent size and type (much like an array).

Where the data elements are variable length, you will generally use sequential access. In order to determine where one element ends and the following element begins, an offset to the next element will usually be written as part of the previous element's data.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is difference between random file access and sequencial flle access in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Whats the difference between SDRAM and normal ram?

sd ram is synchronous dynamic random access memory, ram is just random access memory


What are the difference between read only memory and random access memory?

ROM is volatile


The main difference between sdram and dram is that dram is?

The main difference between Synchronous random access memory, SDRAM and Dynamic Random Access Memory, DRAM is that SDRAM is synchronous while DRAM is asynchronous. As such, SDRAM is efficient in retrieving and storing data than DRAM.


What is the difference between pc5300 and pc5400 RAM and are they compatible?

The basic difference between PC5300 and PC5400 random access memory is data speed, which is marginal. However, because of the slight difference, the would likely not be compatible.


What is the difference between the read only memory and the random access memory in the internal memory unit of a computer?

R.O.M. :SoftwareR.A.M. :Hardware


Can 9 month old Alpha male kitten pair up with a 4 month old Beta male kitten?

Difference between direct access and random access


What is the difference between random sampling and non random sampling?

a


What is the difference between simple random sampling and random sampling?

Simple!


What Sd ram means?

I need answer plz tell me difference between sd ram and as ddr ram


What is the difference between a bias and a random error?

Bias is systematic error. Random error is not.


What is the difference between a random variable and random process?

A random process is a sequence of random variables defined over a period of time.


What is the difference between ram and the ias?

RAM means Random Access Memory. It's a plugin in to the motherboard for the process to use temporary memory. IAS means Instant access store, It is on the processor chip itself.