简体   繁体   中英

different types of storage specifiers in c?

C语言中的存储说明符有哪些不同类型?

Formally there's no such thing as "storage specifier" in C. C has storage-class specifiers . There are five of them: typedef , extern , static , auto and register . Obviously, what typedef does is not exactly what is commonly understood under "storage class", but the concept of storage-class specifier in C has strong syntactic roots, which is why typedef was also included into that category.

MSDN says :

  • auto
  • register
  • static
  • extern

I would add to that volatile .
I don't think const quite counts... but is similar.

If you include C++, more come into play, including mutable .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM