C language

来自cppreference.com
< c

 
 
C语言编写
大会的主题
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
预处理器
评论
关键字
ASCII表
转义序列
C
流量控制
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
条件执行语句
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
迭代语句
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
跳转语句
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
功能
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
函数声明
的历史。内嵌说明
类型
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
规范
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
CV符
存储类说明
alignas说明 (C99)
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
表达式
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
为了评价
其他运营商
运营商
运算符的优先级
实用工具
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typedef declaration
属性 (C99)
转换
杂项
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
内联汇编
 

This is a brief reference of available C constructs.

目录

[编辑] 大会的主题

[编辑] 预处理器

[编辑] 评论

[编辑] 关键字

[编辑] ASCII表

[编辑] 转义序列

[编辑] C

[编辑] 流量控制

[编辑] 条件执行语句

Different code paths are executed according to the value of given expression

  • if执行代码的条件
    Original:
    if executes code conditionally
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • switch执行代码的整体参数的值
    Original:
    switch executes code according to the value of an integral argument
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[编辑] 迭代语句

The same code is executed several times

[编辑] 跳转语句

Continue execution at a different location

  • continue跳过封闭的循环体的其余部分
    Original:
    continue skips the remaining part of the enclosing loop body
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • break结束的封闭循环
    Original:
    break terminates the enclosing loop
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • goto在其他位置继续执行
    Original:
    goto continues execution in another location
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • return终止执行的封闭功能
    Original:
    return terminates execution of the enclosing function
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[编辑] 功能

The same code can be reused at different locations in the program

[编辑] 类型

[编辑] 规范

[编辑]

Literals are the tokens of a C program that represent constant values, embedded in the source code.

[编辑] 表达式

符和操作数指定的计算表达式可以是一个序列。表达可能会导致一个值,并可能引起副作用.
Original:
An expression is a sequence of operators and operands that specifies a computation. An expression can result in a value and can cause side effects.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Common operators
分配 incrementNJdecrement 算术 合乎逻辑的 比较 memberNJaccess 其他

a = b
a += b
a -= b
a *= b
a /= b
a %= b
a &= b
a |= b
a ^= b
a <<= b
a >>= b

++a
--a
a++
a--

+a
-a
a + b
a - b
a * b
a / b
a % b
~a
a & b
a | b
a ^ b
a << b
a >> b

!a
a && b
a || b

a == b
a != b
a < b
a > b
a <= b
a >= b

a[b]
*a
&a
a->b
a.b

a(...)
a, b
(type) a
? :
sizeof

[编辑] 实用工具

;类型
Original:
; Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
;施放
Original:
; Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 杂项