C language 01

Source: Internet
Author: User

1, in order to distinguish the octal system, the hexadecimal difference: eight before adding 0, hex plus x0, such as 058,x059;

2, binary conversion, binary, octal, decimal, hexadecimal conversion between each other. (converted to binary after the other is good conversion)

such as: decimal number 57, binary 111001, from binary to octal, from the right of the binary to the left 3 digits of a group, the front is not enough to fill 0, that is, 111,001, the calculation octal is 071;

Converted from binary to 16 binary, from the right of the binary to the left 4 digits of a group, the front is not enough to fill 0, that is, 0011,1001, the calculation of hexadecimal for 0x39;

3. Comments

Single-line Comment

/**/Multi-line comments

4. Basic data type

Commonly used are 3, char, int, float, respectively 1 characters, 4 characters, 4 or 8 characters; placeholder%c,%d,%f

5, variable, represents a storage area

Type modifier type name = initial value

6. Naming rules for variable names

Can only be made up of numbers, letters, and underscores, and numbers cannot begin

Cannot have the same name as a system reserved word

Cannot make a duplicate variable name.

See the name and the meaning (specification)

Hump nomenclature: The first letter is lowercase and the remaining initials are capitalized. such as: Studentage

7. Note: The return value of an expression

8. The statement is the smallest unit of program execution, ending with a semicolon

9, input, output statement

scanf if the reading data item type matches the format character, continue reading?; Otherwise, you are no longer viewing the remainder, which returns

Printf

10. Escape character

\ n Escape character

\ \ print \ printf ("\ \ \ n");

Percent Print% printf ("%%\n"); Output%




C language 01

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.