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

Program of function overloading in c++ , Program of function overloading: ...

Program of function overloading: class vector{                 private :                 int v[3];                   public:                 /*friend istream &

C program for radius of circle, C Program for RADIUS OF CIRCLE   #de...

C Program for RADIUS OF CIRCLE   #define PI 3.14159 main() {           float r,a;           clrscr();           printf("ENTER THE RADIUS OF A CIRCLE: ");

Explain the formatted input output with strings, Explain the Formatted Inpu...

Explain the Formatted Input Output with Strings? These are the third set of the scanf and printf families. They are called sscanf and sprintf. sprintf Puts formatted dat

Where are longjmp and setjmp used in c++, Where are longjmp and setjmp used...

Where are longjmp and setjmp used in C++? -Setjmp and longjmp must not be used in C++. - Longjmp jumps out of the function without unwinding stack. This means that local obj

Define the char data type of c language, Define the Char Data Type of C Lan...

Define the Char Data Type of C Language? The char defines characters. The char type will usually require only 1 byte of internal storage. Every char type has an equivalent inte

#pointers, what is the purpose of pointer ? what is the syntax? how it work...

what is the purpose of pointer ? what is the syntax? how it works?

Specifying and working rules of a class, Specifying a Class: As discuss...

Specifying a Class: As discussed a class is defined to develop an algorithm and bind it together in a core shell. A class is an abstract data type (ADT).  The binding of dat

Padovan string, A Padovan string P(n) for a natural number n is defined as:...

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t

#Padovan string, #A Padovan string P(n) for a natural number n is defined a...

#A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of

Custom scans and alerts think or swim, Custom Scans and Alerts Think or Swi...

Custom Scans and Alerts Think or Swim Project Description: I am seeking somebody to make me several Custom Scans and Alerts on Thinkorswim TOS Skills required are C++ Prog

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