C Chapter III, referring to the data

Source: Internet
Author: User

In the 2nd Chapter we know how the data is expressed in the program, but in actual programming, it is often used to represent the data using another representation of the data----------.

3.1 Why to use the reference data: 1. In the program, some data is not clear, and it is always changing, for such a variable data, if not use a little bit of what to refer to, so we introduced the variables. 2. Another scenario in programming is that we don't know the exact value of it in advance, we also use variables.

We generally use English in variable naming, with different words separated by _, and the first letter of each word can be capitalized.

3.4 Refer to the data to consider two issues

1. Scope: Most suitable is the best, you can use a long long type but the same program, you are the size of another person, even several times, not too good

2. Accuracy: About the number of use of the most is floating point, usually real numbers are infinite loop decimals, just according to the actual needs, the choice can be.

3.6 variable quantity, unknown quantity need to refer to, some invariable quantity also need to refer to

C language support for the fixed amount of the reference, i.e. define, const

C Chapter III, referring to the data

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.