In C language What is the meaning

Source: Internet
Author: User
In text processing, CR, LF, and cr/lf are line breaks used on different operating systems.

And unix/linux the next line with a newline character LF,
The Apple machine (MAC OS system) uses a carriage return CR to indicate the next line.

LF using ' \ n ' notation, the ASCII code is 10, 16 is 0x0a.
So the line wrapping in the Windows platform is represented by 0d 0a two bytes in the text file, while the line wrapping on UNIX and Apple platforms is represented by 0a or 0d byte.
The runtime on a generic operating system automatically determines the wrapping format for text files. If a program runs on Windows, it generates CR/LF text files, while running on Linux generates a text file for the LF format for line wrapping.
Using a file file with another line break on one platform can cause unexpected problems, especially when editing program code. Sometimes the code appears normal in the editor, but when you edit it, it goes wrong because of the newline character problem.
Many text/code editors have a newline character conversion feature that allows you to swap line breaks in a text file with different formats.
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.