Science Teacher Question:
Explain what are the ways of storing data in Files?
Answer:
There are two ways of storing data in files-
1. Text Format- In text format data is stored as a line of character with each line terminated by a new line character (‘n’). Text files are in human readable form and they can be created and read using any text editor.
2. Binary Format– In binary format, data is stored on the disk same way as it is represented in the computer memory.Binary files are not in human readable form they and can be created and read by a specific program written for them .The binary data stored in the file can’t be read by any editor.
The input and output operation in binary files take less time as compared to that of the text files because in binary files no conversion have to take place .However the data written using binary format is not very portable since the size of data types and byte order may be different on different machine. In text format , these problem do not arise,and hence it is more portable.
1. Text Format- In text format data is stored as a line of character with each line terminated by a new line character (‘n’). Text files are in human readable form and they can be created and read using any text editor.
2. Binary Format– In binary format, data is stored on the disk same way as it is represented in the computer memory.Binary files are not in human readable form they and can be created and read by a specific program written for them .The binary data stored in the file can’t be read by any editor.
The input and output operation in binary files take less time as compared to that of the text files because in binary files no conversion have to take place .However the data written using binary format is not very portable since the size of data types and byte order may be different on different machine. In text format , these problem do not arise,and hence it is more portable.
Previous Question | Next Question |
Explain me a lesson that went well and what made it successful? | Please write the general formats for file opening and file closing commands? |