C語言關鍵字分類整理


C語言總覽:

  • 強類型,面向過程
  • 簡潔、靈活:32個關鍵字(C99標准新增5個,C11新增7個),9種控制語句,34種運算符
  • 數據類型豐富,運算符豐富
  • 結構化(控制語句)、模塊化(函數)
  • 靈魂、特色:指針
  • 高級語言中的低級語言:直接訪問物理地址,進行位運算,直接操作硬件

32個關鍵字:

  • 數據類型13個:void  signed unsigned short long int  float double  char  enum  struct union  typedef  (_Bool _Imaginary _Complex)
  • 類型限定、修飾2個:const volatile (restrict  inline)
  • 變量的存儲類別4個:auto  static  extern  register
  • 運算符1個:sizeof 
  • 控制12個:goto  return  break continue  if else  switch case default  do while  for

32個關鍵字(豎版):

數據類型(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

ISO C99標准新增:

  • 數據類型:_Bool  _Imaginary  _Complex  
  • 類型限定、修飾:restrict  inline

ISO C11標准新增:

  • _Alignas  _Alignof  _Atomic  _Static_assert  _Noreturn  _Thread_local  _Generic

其他數據類型:

  • 大小固定的數據類型:int32_t  int64_t
  • sizeof操作符返回的結果類型:size_t
  • ……

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM