C語言關鍵字分類整理
阿新 • • 發佈:2018-05-12
lse ner num 結構化 struct tex 靈魂 bool ext
C語言總覽:
- 強類型,面向過程
- 簡潔、靈活:32個關鍵字(C99標準新增5個,C11新增7個),9種控制語句,34種運算符
- 數據類型豐富,運算符豐富
- 結構化(控制語句)、模塊化(函數)
- 靈魂、特色:指針
數據類型(type)13個: void signed unsigned short long int float double char enum struct union typedef (_Bool _Imaginary _Complex)
類型限定、修飾(type specifier/qualifiers)2個: const volatile (restrict inline)
變量的存儲類別(storage class)4個: auto static extern register
運算符(operator)1個: sizeof
控制(control)12個: goto return break continue if else switch case default do while for
數據類型(type):
- void
- signed unsigned short long int
- float double
- char
- enum
- struct union
- typedef
- (_Bool _Imaginary _Complex)
類型限定、修飾(type specifier/qualifiers):
- const
- volatile
- (restrict inline)
變量的存儲類別(storage class):
- auto
- static
- extern
- register
運算符(operator):
- sizeof
控制(control):
- goto
- return
- break continue
- if else
- switch case default
- do while
- for
C99標準新增5:restrict inline _Bool _Imaginary _Complex
C11標準新增7:_Alignas _Alignof _Atomic _Static_assert _Noreturn _Thread_local _Generic
共32+5+7=44個關鍵字
C語言關鍵字分類整理