static关键字面经
时间: 2023-08-24 15:09:16 浏览: 131
Java关键字final、static使用总结
5星 · 资源好评率100%
回答:
静态变量是使用static关键字进行修饰的变量,包括全局静态变量和局部静态变量。全局静态变量在全局范围内可见,存储在静态存储区,在整个程序运行期间一直存在,并且未经初始化的全局静态变量会被自动初始化为0。全局静态变量只能在定义它的源文件中使用,其他源文件无法使用。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [C++面经总结](https://blog.csdn.net/weixin_38809485/article/details/104900802)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [C++面经——static 关键字的作用](https://blog.csdn.net/weixin_41234001/article/details/103303420)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文