Category: File Handling

C++ Stream Classes for File Handling

A logical interface between data file or input/output device and program is called stream. It is a general name given to a flow of data (a sequence of bytes). The stream may be input stream or output stream. C++ provides predefined stream classes that are used to handle input/output streams. These are defined in related […]

File Operation Modes in C++

Different operations can be performed on the data file. The basic operations that are usually performed on the data files are given below: Open: It is used to read data from it to a data file open or to write it into data. The data should be stored in memory before reading or writing data. Read: […]

C++ File Access Methods – Sequential & Direct Access Methods

The way in which information stored in a data file can be accessed is known as file access method.  The stored information into data files can be accessed by using different ways. However, the fundamental methods that are commonly used to accessdata from files are as follows: Sequential Access Method  Direct Access Method  What is […]

Types of Data File – Text Files – Binary Files

How many Types of Data File?There are two types of data files: Text Files Binary Files What is Text File?  In text file, data is stored in ASCII code. one character or digit takes one byte in memory. Thus, the number 3.5 will take 3 bytes (one byte for each digit including the decimal point). […]