In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
The editor of this article introduces in detail "can you omit the keyword auto in the c language when making the storage category declaration?", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "can be omitted when using the keyword auto in the c language to make a storage category declaration?" the article can help you solve your doubts.
The default storage category of formal parameters in C language is the auto; formal parameter. When the keyword auto is used to declare the storage category, the keyword "auto" can be omitted, and if auto is not written, it is implicitly defined as "automatic storage category", which belongs to dynamic storage mode.
This article operating environment: Windows7 system, C11, Dell G3 computer.
What is the default storage category for formal parameters in C language?
The default storage category for formal parameters in the C language is auto. When the program is compiled, no storage space is allocated for the formal parameters. Formal parameters temporarily occupy storage space only when called.
When the formal parameter uses the keyword auto to declare the storage category, the keyword "auto" can be omitted, and if auto is not written, it is implicitly determined as "automatic storage category", which belongs to the dynamic storage mode.
Extended data
1. The type of formal parameter can not be omitted. The storage type of the function is the storage type in front of the data type in front of the function name when defining the function. By default, it should be: extern, indicating that the function belongs to an external function (that is, it can be called by functions in other C source program files outside this C file).
2, for custom functions, you can use default parameters to achieve a certain degree of "overloading" and other functions, the default parameters can only be placed in the function declaration, because the compiler must know the default values before use, and the parameters at the back of the function parameter list can be defaulted. After using the default parameter values in a certain location, they are all default parameter values.
After reading this, the article "can you omit the keyword auto when making a storage category declaration in c language" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it before you can understand it. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.