C Language 32 Keywords Summary

Source: Internet
Author: User

C Language 32 Keywords

First Category: Data type keywords

A basic data type (5)

void declares that the function has no return value or no parameter, declares an untyped pointer, and explicitly discards the result of the operation.

char type data, which is one of the integer data.
int "Integer data, usually the machine word length specified by the compiler.
float single-precision floating-point data, which is a type of floating-point data, Save 6 digits after the decimal point.
double-precision floating-point data, which is a type of floating-point data, Higher precision than float, save 15/16 digits after the decimal point.

Type B modifier keywords (4)

The short modifier int, the shorter integer data, can omit the modified int.

long modifies int, long-shaped data, which omits the modified int.
' unsigned the integer data, unsigned data type.

C Complex Type keywords (5)

struct structure declaration.

union shared body declaration.
typedef declares type aliases.
sizeof gets the size of a particular type or variable of a particular type.

d Storage-level keywords (6 )

Auto is specified as an automatic variable and is automatically assigned and freed by the compiler. Usually allocated on the stack.

Static is specified as a statically variable, assigned in the static variable area, and when the function is decorated, the specified function scope is inside the file.
Register is 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 passPasses the register instead of the stack pass parameter.
extern specifies that the corresponding variable is an external variable, which is defined in another target file, which can be considered as a convention declared by another file.
const and volatile are collectively referred to as "CV characteristics", where the specified variable cannot be changed by the current thread/process (but may be modified by the system or another thread/process)Change).
Volatile and const collectively referred to as "CV characteristics", the value of the specified variable may be changed by the system or other processes/threads, forcing the compiler every time from memoryGets the value of the variable in the

Type II: Process Control keywords

A jump Structure (4)

Return is used in the body of the function, returning a specific value (or void value, i.e. no return value).

continue end the current loop and start the next cycle.
break jumps out of the current loop or switch structure.

B Branch Structure (5)

If condition statement

else conditional statement Negation branch (with IF).
"the branch tag in the case switch statement.

C Cycle Structure (3)

For-for-loop structure, for (1;2;3) 4, the Order of execution for the 1->2->4->3->2 ... loop, where 2 is the loop condition.

Do-do loop structure, do 1 while (2), the execution order is 1->2->1 ... loop, 2 is the loop condition.
While the loop structure, while (1) 2, the execution order is 1->2->1 ... loop, 1 is the loop condition, the above loop statement, when the loop condition expression is true then continue the loop, false then jump out of the loop.


This article is from the "Similarities" blog, please be sure to keep this source http://yutianheji.blog.51cto.com/9580523/1835755

C Language 32 Keywords Summary

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.