Data types, variable constants, operators

Source: Internet
Author: User

1, binary conversion

X-binary conversion to decimal weighted sum

Decimal conversion to X-binary to even remove the rewind remainder

2. Basic data type

3. Constant variables

Constants: Values that cannot be changed during a program run

Variable: A variable represents a storage area, the value of a storage area is the value of a variable, and the value of the variable can be changed during operation.

4. Operators

4.1 + +--arithmetic

b = a++; equivalent to B = A; A = a + 1;

b = ++a; equivalent to a = a + 1; b = A;

The operator is preceded by a line, the operator is followed, and then the line is followed.

4.2 Exchange two-digit value

5. Expression (must have result)

6. Input/Output function

scanf ("%d%d", A, b) considerations:

1,%d%d can have a comma, but the middle of the input value also need a comma, and the double quotation mark and%d can not have spaces.

2, only big return to end the input.

3. Cannot add \ n

\ print \ percent Print%

Data types, variable constants, operators

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.