Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Types of Data File - Text Files - Binary Files

How many Types of Data File?
There are two types of data files:

  1. Text Files
  2. 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). The user can easily understand the data of text file. The data of data file can also easily be printed on the printer.
The text files can easily be created in any text editor programs such as Notepad in Windows. The text file (as data file) can be created and output of program can be stored in it. In text file, data is accessed sequentially.

What is Binary File?

In binary input/output, data is stored into files in binary format. An integer type data takes 2 bytes, float type data takes 4 bytes etc. For example, in binary format, the integer value “29673” will take only two bytes on the disk. Typically, the binary format is used to organize large amount of data on the disk. This format takes less space on disk rather than text format.
The data of binary file is only understandable by computer. The binary file can be created to store output of a program. The binary file provides the efficient way to access the data. The data can be accessed randomly and quickly.





This post first appeared on Programming Explain, please read the originial post: here

Share the post

Types of Data File - Text Files - Binary Files

×

Subscribe to Programming Explain

Get updates delivered right to your inbox!

Thank you for your subscription

×