Understanding of file Read Write and two file open modes

Source: Internet
Author: User

The file has two open modes: text mode and binary mode

When the C language program to the file operation, the first open the file in a certain mode, set up a cache (read-write mode two), the buffer has the control information of the file, and then use I/O functions to manipulate the file.

For the fread and fwrite functions, regardless of the mode in which the files are opened, fread and fwrite only copy the original data as is, while other functions may convert the original function.

We then use the application to open the file, depending on the application's interpretation of the file.

First write to this, and so on after a deeper step to understand the additional.

Understanding of file Read Write and two file open modes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.