点滴积累
softwareren1
这个作者很懒,什么都没留下…
展开
-
关于定义为volatile的变量
定义为volatile的变量(如volatile int i=10;)主要有两点: 1.编译器不能对此变量进行优化,每次需要使用时都从存储i的地址中取值,而不是使用上次读取的保存在寄存器中的值; 2.使用场景:一般如果一个变量可能被程序以外改变,可以将其定义为volatile变量。 参考:http://www.cnblogs.com/chio/archive/2007/11/24/97原创 2013-05-23 21:07:26 · 608 阅读 · 0 评论 -
C语言中的Trigraph sequences
以下对Trigraph sequences的描述摘自ANSI C标准,一般很少提到和用到。 2.2.1.1 Trigraph sequences All occurrences in a source file of the following sequences of three characters (called trigraph sequences /5/)are replac原创 2013-05-23 21:16:21 · 615 阅读 · 0 评论 -
C语言中的关键字
以下摘自ANSI C标准: 3.1.1 Keywords Syntax keyword: one of auto double int struct break else long switch case enum register typedef原创 2013-05-24 23:16:07 · 385 阅读 · 0 评论 -
C语言中的label
以下摘自ANSI C标准: A label name is the only kind of identifier that has function scope. It can be used (in a goto statement) anywhere in the function in which it appears, and is declared implicitly b原创 2013-06-02 16:05:55 · 5778 阅读 · 0 评论 -
C语言中的枚举
以下摘自ANSI C标准: An enumeration comprises a set of named integer constant values. Each distinct enumeration constitutes a different enumerated type. 由此可见,枚举类型必然是整型常量。原创 2013-06-02 21:15:35 · 419 阅读 · 0 评论 -
C语言中的类型
以下摘自ANSI C标准: An object declared as type char is large enough to store any member of the basic execution character set. If a member of the required source character set enumerated in $2.2.1 is原创 2013-06-02 21:42:13 · 509 阅读 · 0 评论