Dark Horse Programmer keywords, identifiers, comments (C language)

Source: Internet
Author: User

Key Words:Defined:

1> keyword is the C language provides a special meaning of the symbol, also known as " reserved word ."

The 2> C language provides a total of 32 keywords, all of which are given special meaning by C language.

Characteristics:

1> are all lowercase.

2> displays special colors in the development tool or in the Smart Text Editing tool. By default, all keywords in the C language will be purple-brown in Xcode.

The main keywords in the C language are: int return.

identifiers:Definition:

Identifiers are some of the symbols and names that you customize in your program. To differentiate from keywords: the keyword is the symbol that is provided by the C language by default, and the identifier is customized by the programmer.

Role:

C language is composed of functions, a C program may have more than one function, in order to distinguish these functions, each function is given a name.

Naming rules:

1, only by 26 letters of the case, 10 Arabic numerals 0~9, underline _ composition.

2, strictly case-sensitive, such as test and test is 2 different identifiers.

3. You cannot start with a number.

4. Keywords cannot be used as identifiers.

Naming conventions:

1, the name of the identifier to be able to see the name of the meaning, others see this identifier to be able to think of its meaning.

2, if the identifier contains more than one word, you can use the Hump logo (except the first word, the first letter of each word is capitalized): FirstName, MyFirstName, or use the underscore _ to connect: first_name, My_first_name.

notes:

Note is written for people to see, mainly for the subsequent editing of the program, in the development tool notes are generally green bean paste.

Single-line Comment:

A single-line comment begins with two forward slashes, that is, starting with//, only one line is commented, from//To the end of the line is the contents of the comment.

Multi-line Comments:

Multiline comments start with/* and end with */, and the contents in/* and/* are comments.

Nested behavior of annotations:

1, single-line comments can be nested single-line comments, multiline comments.

2. Multiline comments can be nested in a single line of comments.

3. Multiline comments cannot nest multiple lines of comments.

Dark Horse Programmer keywords, identifiers, comments (C language)

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.