Windows next car and line break

Source: Internet
Author: User
Windows next car and line break

Data entered from the keyboard is generally ASCII code, which is a text file, when sent to the computer memory, carriage return and newline characters into a newline character (that is, the carriage return and newline characters in the Windows text is two character), and then from memory in the "WB" mode (binary) output to a file, Character conversions do not occur, output to disk files as-is in memory, and when read in "RB" mode (binary), the data is entered as-is, no character conversion occurs, and is read directly into memory, and when characters are displayed on the screen with the printf function, The newline character is converted to carriage return plus a newline character.

If you read the data in "R" mode (text), the data will go wrong because the line break will be converted again when it is displayed.

 

Windows next car and line break

Related Article

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.