The path to C Language Learning (1)

Source: Internet
Author: User

The path to C Language Learning (1)
After I learned the C language, I thought I could never say goodbye to single quotes. Ah, I encountered the single quotes in the C language in less than a week, and I was surprised. For (I = 0; * (p + I )! = '\ 0'; I ++) * (q + I) = * (p + I); * (q + I) = '\ 0' I used double quotation marks for (I = 0; * (p + I) at the beginning )! = "\ 0"; I ++) * (q + I) = * (p + I); * (q + I) = "\ 0, oh, a paragraph error occurred. My God, I encountered a paragraph error in less than a week after I learned the C language. What did I do? I thought about it later (I looked at the sample code) it is the reason for the quotation marks, just change it to single quotes. I learned two points: 1. A simple understanding of segment errors means that the memory is out of bounds. 2. The reason why my program's memory exceeded is that the double quotation marks show what you see in the table. "\ 0" is \ 0. If it is single quotation marks, '\ 0 ', indicates the end mark of the array.

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.