当前位置:网站首页>2.3 learning content
2.3 learning content
2022-07-05 15:25:00 【Houli crab 670】
- Local and global variables
- The scope and life cycle of variables
- stay VS2021 Use traditional scanf The reason for the warning
The priority of local variables and global variables and how to distinguish
When the variables of local variables and global variables are the same , Meeting “ Local priority global ”
Generally speaking , Inside the braces are local variables , Outside the braces are global variables ( I used to think that global variables are also in the main function , Today, I learned that it is a local variable )
The scope and life cycle of variables
Scope , Generally speaking, it is the range of variables . The life cycle is the period of time from the definition of a variable to leaving its function .
About the scope of variables , If you define a variable in a source file (int a) Then I also want to use this variable in another source file , Direct write extern int a. Then you can use it .
scanf The reason for the warning
because scanf It doesn't care about the string you enter ( Or numbers ) Whether it exceeds the originally defined space . For example, I define a character array (char a[5]) But I input more than five characters (ashdjdjj), The result of running is not ashdj It is ashdjdjj, And the program will crash . Simply put “ The function has insufficient restrictions on the type and number of parameters .”( I found it online haha , Chinese is not good , Language is not refined )
边栏推荐
- Common PHP interview questions (1) (written PHP interview questions)
- Cartoon: programmers don't repair computers!
- Where is the operation of convertible bond renewal? Is it safer and more reliable to open an account
- mapper. Comments in XML files
- JMeter performance test: serveragent resource monitoring
- episodic和batch的定义
- The difference between abstract classes and interfaces in PHP (PHP interview theory question)
- Ten billion massage machine blue ocean, difficult to be a giant
- Bugku's Ping
- ICML 2022 | 探索语言模型的最佳架构和训练方法
猜你喜欢
Mysql---- function
Reasons and solutions for redis cache penetration and cache avalanche
Ctfshow web entry information collection
I spring and autumn blasting-1
Ten billion massage machine blue ocean, difficult to be a giant
Anti shake and throttling
Common redis data types and application scenarios
Common MySQL interview questions
NBA赛事直播超清画质背后:阿里云视频云「窄带高清2.0」技术深度解读
Bugku's Ping
随机推荐
Bugku alert
机器学习框架简述
Ionic Cordova project modification plug-in
SQL Server learning notes
数据库学习——数据库安全性
Coding devsecops helps financial enterprises run out of digital acceleration
Anaconda uses China University of science and technology source
1330:【例8.3】最少步数
Install PHP extension spoole
Bugku's Ah Da
First PR notes
lvgl 显示图片示例
Bugku easy_ nbt
Behind the ultra clear image quality of NBA Live Broadcast: an in-depth interpretation of Alibaba cloud video cloud "narrowband HD 2.0" technology
swiper. JS to achieve barrage effect
Leetcode: Shortest Word Distance II
Garbage collection mechanism of PHP (theoretical questions of PHP interview)
[recruitment position] infrastructure software developer
ICML 2022 | explore the best architecture and training method of language model
亿咖通科技通过ISO27001与ISO21434安全管理体系认证