Write a program to updating random access file

In a random access file, we are allowed to moved the file pointer to different locations to read data at various locations within a file. When the item is scanned at the checkout, the barcode is used to look up a description and price of the item.If the file were sequential access, we would have to start searching at the beginning of the file which is probably slower than we would like.It is possible to write objects to disk but it requires that the object have a member function associated with it.

write a program to updating random access file-69write a program to updating random access file-11write a program to updating random access file-64

The usual stream classes is provided which allows for files that can be written to and read from if this is a desirable property (in the design of database type programs, this is often the case).An MP3 file that contains an ID3 version 1 tag includes the ID3 data at the end of the file, in the final 128 bytes.Using streams for file processing is certainly possible in C , but most C textbooks do not include any information regarding the full functionality of streams.The reason for this is the presence of member functions.It would not make sense to save the member functions; these member functions end up getting saved as memory locations which would cause your computer to crash if you ever loaded one from disk with an old memory location.

Leave a Reply