Explain processing a data file, C/C++ Programming

Assignment Help:

Explain Processing A Data File?

Mainly data file applications needs that a data file be altered as it is being processed. For instance in an application involving the processing of customer records it perhaps desirable to add new records to the file either at the end of the file or interspersed among the existing records to delete existing records that to modify the contents of existing records or to rearrange the records and these requirements in turn suggest numerous different computational strategies.

Consider for instance the problem of updating the records within a data file. There are numerous approaches to this problem. Maybe the most obvious approach is to read each record from a data file update the record as necessary and then write the updated record to the same data file. But there are some troubles with this strategy. In particular it is hard to write and read formatted data to the same data file with no disrupting the arrangement of the data items within the file. Furthermore the original set of records may become unapproachable if something goes wrong during the program execution. Another approach is to work with two diverse data files - an old file (a source) and a new file. Every record is read from the old file the updated as necessary and then written to the new file. When each and every one of the records have been updated the old file is deleted or placed into archival storage and the new file renamed. Therefore the new file will become the source for the next round of updates.

 


Related Discussions:- Explain processing a data file

What operators can or cannot be overloaded?, A: Mostly can be overloaded. T...

A: Mostly can be overloaded. The only C operators which can't be are. and?: (and sizeof, that is technically an operator). C++ adds a few of its own operators, mostly which can be

#title., #quGiven the Array class definition in Fig. 11.10-11.11 (pp. 476-4...

#quGiven the Array class definition in Fig. 11.10-11.11 (pp. 476-479) of the textbook, write a new overloaded operator function for the ‘%’ (modulus) operator (i.e., return an arra

Battleship game, Create a program to print a battleship grid to the console...

Create a program to print a battleship grid to the console and mark squares as destroyed

#title., A student apears in exam of math, physics, and chemistry. Write a...

A student apears in exam of math, physics, and chemistry. Write a program to find the total marks aa student has aqueired find the average.

Explain pure virtual functions, Pure Virtual Functions An abstract clas...

Pure Virtual Functions An abstract class is one, which is used just for deriving some other classes. No object of this class is declared and used in the program. Likewise, ther

Reverse digit function, how can i write reverse digit function like writing...

how can i write reverse digit function like writing 1234 and printing 4321

Areaundercurve, Write a program to find the area under the curve y = f(x) b...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Pointers, In this sub-task will you implement three functions for the final...

In this sub-task will you implement three functions for the final three function prototypes that will do exactly the same as the three functions that you have just written. This ti

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd