auto case const enum extern typedef unsigned union“这些函数在C语言中是什么意思? 能不能给我注释一

typedef \u4fee\u9970\u7684enum\u53ef\u4ee5\u4f7f\u7528extern \u8c03\u7528\u5417

\u9996\u5148\u8fd9\u4e9b\u4e0d\u662f\u51fd\u6570!
auto \u662f\u81ea\u52a8\uff08\u53d8\u91cf\uff09
case \u662fswitch\u8bed\u53e5\u4e2d\u7684\u201c\u60c5\u51b5\u201d
const \u662fconstant \u5e38\u91cf
enum \u662fenumeration\u679a\u4e3e\uff08\u5217\u4e3e\uff09
extern \u662f\u201c\u5916\u90e8\u201d\u53d8\u91cf\u6216\u51fd\u6570
typedef \u662ftype define \u5b9a\u4e49\u7c7b\u578b
unsigned \u662f\u65e0\u7b26\u53f7\u7c7b\u578b\uff08\u6b63\u8d1f\u53f7\uff09
union \u662f\u8054\u5408\u4f53
\u81f3\u4e8e\u5177\u4f53\u7684\u7528\u6cd5\u592a\u591a\u4e86\uff0c\u6ca1\u6cd5\u8bf4\uff0c\u4f60\u627e\u672c\u4e66\u770b\u770b\u5c31\u77e5\u9053\u4e86\uff01

#include int main(){ int year,n=0; for( year=1;year<=3000;year++ ) { if ( (year%4==0 && year%100!=0) || year%400==0 ) n++; } printf("n=%d\n", n ); return 0;}

首先这些不是函数!
auto 是自动(变量)
case 是switch语句中的“情况”
const 是constant 常量
enum 是enumeration枚举(列举)
extern 是“外部”变量或函数
typedef 是type define 定义类型
unsigned 是无符号类型(正负号)
union 是联合体
至于具体的用法太多了,没法说,你找本书看看就知道了!

回答的差不多,但是如果这样看的话,还不如e文的好理解,尤其是union这个词儿。

扩展阅读:wired auto config ... autodownload 1 ... canva ... androidauto最新版下载 ... autoit v3 ... mechanism ... auto bass chord ... automobile ... paulas choice ...

本站交流只代表网友个人观点,与本站立场无关
欢迎反馈与建议,请联系电邮
2024© 车视网