当前位置:网站首页>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 )
边栏推荐
- 可视化任务编排&拖拉拽 | Scaleph 基于 Apache SeaTunnel的数据集成
- Database learning - Database Security
- P6183 [USACO10MAR] The Rock Game S
- Your childhood happiness was contracted by it
- Talk about your understanding of microservices (PHP interview theory question)
- I spring web upload
- swiper. JS to achieve barrage effect
- Au - delà du PARM! La maîtrise de l'Université de Pékin propose diverse pour actualiser complètement le classement du raisonnement du NLP
- Bugku's steganography
- Bugku's Ping
猜你喜欢

Redis' transaction mechanism

OSI 七层模型

Huiyuan, 30, is going to have a new owner

F. Min cost string problem solving Report
![P1451 calculate the number of cells / 1329: [example 8.2] cells](/img/c4/c62f3464608dbd6cf776c2cd7f07f3.png)
P1451 calculate the number of cells / 1329: [example 8.2] cells

Au - delà du PARM! La maîtrise de l'Université de Pékin propose diverse pour actualiser complètement le classement du raisonnement du NLP

lv_font_conv离线转换

Garbage collection mechanism of PHP (theoretical questions of PHP interview)

Dark horse programmer - software testing -10 stage 2-linux and database -44-57 why learn database, description of database classification relational database, description of Navicat operation data, de

Select sort and bubble sort
随机推荐
MySQL 巨坑:update 更新慎用影响行数做判断!!!
计算中间件 Apache Linkis参数解读
Ten billion massage machine blue ocean, difficult to be a giant
How to introduce devsecops into enterprises?
How can I quickly check whether there is an error after FreeSurfer runs Recon all—— Core command tail redirection
easyOCR 字符识别
Install PHP extension spoole
lvgl 显示图片示例
MySQL5.7的JSON基本操作
Dark horse programmer - software testing -10 stage 2-linux and database -44-57 why learn database, description of database classification relational database, description of Navicat operation data, de
JMeter performance test: serveragent resource monitoring
Number protection AXB function! (essence)
当代人的水焦虑:好水究竟在哪里?
Common MySQL interview questions (1) (written MySQL interview questions)
30岁汇源,要换新主人了
Optional parameters in the for loop
How to paste the contents copied by the computer into mobaxterm? How to copy and paste
F. Min cost string problem solving Report
Nine hours, nine people, nine doors problem solving Report
做研究无人咨询、与学生不交心,UNC助理教授两年教职挣扎史