Dark Horse Programmer 1, C language 32 keywords sorting and sorting

Source: Internet
Author: User

Java training, Android training, iOS training,. NET training, look forward to communicating with you!

C language in a total of 32 keywords

First, data type keywords (total 20)

A. Basic data Type (5)
void: Declares a function with no return value or no argument, declares an untyped pointer, and explicitly discards the result of the operation
Char: Character type data, which is an integral type of data
int: integer data, usually the machine word length specified by the compiler
FLOAT: single-precision floating-point data, a type of floating-point data
Double: dual-precision floating-point data, which is a type of floating-point data

B. Type modifier keywords (4)
Short: Modifies int, shorter integer data, can omit the modified int.
Long: Modifies int, length shaping data, can omit the modified int.
Signed: Modifying integer data, signed data type
Unsigned: Modifying integer data, unsigned data type

C. Complex Type Keywords (5)
struct: struct declaration
Union: Common Body Declaration
Enum: enum declaration
typedef: Declaring type aliases
sizeof: Getting the size of a particular type or variable of a particular type

D. Storage-level Keywords (6)
Auto: Specified as an automatic variable, automatically allocated and freed by the compiler. Usually allocated on the stack
Static: Specifies that the function is scoped to the file when it is assigned the static variable, and when the function is modified
Register: Specified as a register variable, it is recommended that the compiler either store the variable in the Register or modify the function parameter, suggesting that the compiler pass the parameter through the register instead of the stack
extern: Specifies that the corresponding variable is an external variable, that is, the definition of the marked variable or function in another file, prompting the compiler to find its definition in other modules when encountering this variable and function.
Const: With volatile collectively "CV attribute", specified variable cannot be changed by current thread/process (but may be changed by system or other thread/process)
Volatile: With the const collectively referred to as "CV attribute", the value of the specified variable may be changed by the system or other process/thread, forcing the compiler to get the value of the variable from memory every time

Ii. Process Control Keywords (total 12)

A. Jump Structure (4)
Return: Used in the body of a function to return a specific value (or void value, i.e. no return value)
Continue: End the current loop and start the next cycle
Break: Jump out of the current loop or switch structure
Goto: Unconditional Jump Statement

B. Branch structure (5)
If: Conditional statement, do not need to put a semicolon behind
ELSE: Conditional statement Negation branch (with IF)
Switch: Toggle statement (Multi-branch statement)
Case: Branch marks in a switch statement
Default: The "other" branch in the switch statement, optional.

C. Circular structure (3)
FOR:FOR loop structure, for (1;2;3) 4; the execution order is 1->2->4->3->2 ... loop, where 2 is the loop condition. In the entire for loop, expression 1 is evaluated only once, and expression 2 and expression 3 may be evaluated multiple times or not at once. The loop body may be executed more than once, or it may not be executed at one time.
DO:DO loop structure, do 1 while (2); The order of execution is 1->2->1 ... loop, 2 is the loop condition
While:while loop structure, while (1) 2; The order of execution is 1->2->1 ... loop, 1 is the loop condition
The above loop statement, when the loop condition expression is true to continue the loop, false then jump out of the loop.

Dark Horse Programmer 1, C language 32 keywords sorting and sorting

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.