C语言的关键字有哪些?都有什么意思?

在学习数据结构的时候,有好多的算法在TC上实现不了,有的类型要重新定义,有的不需要,

所谓关键字就是已被Turbo C2.0本身使用, 不能作其它用途使用的字。例如关键字不能用作变量名、函数名等
C语言总共有32个关键字:

Turbo C2.0有以下关键字:
Turbo C2.0扩展的共11个
asm _cs _ds _es _ss cdecl far near huge interrupt pascal

由ANSI标准定义的共32个 :
auto double int struct break else long switch case enum register typedef char extern return union const float short unsigned continue for signed void default goto sizeof volatile do if while static

注:关键字auto用于说明自动变量,通常不用;volatile(易变的)表示该变量不经过赋值,其值也可能被改变(例如表示时钟的变量、表示通信端口的变量等)。

参考资料:http://www.is.pku.edu.cn/~qzy/c/key.htm

温馨提示:内容为网友见解,仅供参考
第1个回答  2006-11-06
randy_yu说得挺全,没什么说的了。auto是系统在没有为变量显示声明存储类型时自动视为auto,不是通常不用;register 寄存器变量;extern 外部变量;static 静态变量
相似回答