Processing Records:-

The data that is stored in a file is frequently organized in records. A record is a complete set of data about an item, and a field is an individual piece of data within a record.

When data is written to a file, it is often organized into records and fields. A record is a complete set of data that describes one item, and a field is a single piece of data within a record. For example, suppose we want to store data about employees in a file. The file will contain a record for each employee. Each record will be a collection of fields, such as name, ID number, and department. This is illustrated in the Figure (given below).



(Fields in a record.)

Each time you write a record to a file, you write the complete set of fields that make up the record. For example, Figure (given below) shows a file that contains three employee records. Each record consists of the employee's name, ID number, and department.



(Records in a file.)