当前位置:网站首页>1. C language variable type, global variable, local variable
1. C language variable type, global variable, local variable
2022-07-28 20:04:00 【A programmer who loves playing badminton】
Variable type
char 1 byte
short 2 2^16-1 = 65535
int 4
long 4/8
float 4
double 8
Setting the data type is in the Apply space to memory
Global and local variables
Global variables : It's defined in Code block ({}) outside The variable of
local variable : It's defined in Inside the code block
It is suggested that the names of local variables should not be the same , If When the names are the same , Local variables take precedence
C Language policy : The variable should be defined at the front of the current code block .
int a = 100;// Global variables
int main(int argc, char const *argv[])
{
int a = 10;// local variable
printf("%d", a);
return 0;
}边栏推荐
- 【NPP安装插件】
- 云原生编程挑战赛火热开赛,51 万奖金等你来挑战!
- 利用STM32的HAL库驱动1.54寸 TFT屏(240*240 ST7789V)
- [C language] simulation implementation of pow function (recursion)
- How to write the SQL statement of time to date?
- Servlet learning notes
- 基于QTGUI图像界面的空战游戏设计
- Implementation of memcpy in C language
- Getting started with enterprise distributed crawler framework
- Deploy ZABBIX automatically with saltstack
猜你喜欢

Intermediate soft test (system integration project management engineer) high frequency test site

一文读懂如何部署具有外部数据库的高可用 K3s

Cloud computing notes part.1 - system management

Longest Palindromic Substring

JS preventdefault() keyboard input limit onmousewheel stoppropagation stop event propagation

Common APIs in string

JS batch add event listening onclick this event delegate target currenttarget onmouseenter OnMouseOver

KubeEdge发布云原生边缘计算威胁模型及安全防护技术白皮书

“中国网事·感动2022”二季度网络感动人物评选结果揭晓

河北邯郸:拓展基层就业空间 助力高校毕业生就业
随机推荐
Basic concept and essence of Architecture
毕马威中国:证券基金经营机构信息技术审计项目发现洞察
English translation Italian - batch English translation Italian tools free of charge
Leetcode day3 find duplicate email addresses
Concurrent programming, do you really understand?
KubeEdge发布云原生边缘计算威胁模型及安全防护技术白皮书
Sprint for golden nine and silver ten, stay up at night for half a month, collect 1600 real interview questions from Android post of major manufacturers
Return and job management of saltstack
XOR operation and its usage
Leetcode day4 the highest paid employee in the Department
MIR专题征稿 | 常识知识与推理:表示、获取与应用 (10月31日截稿)
Redis笔记
MySQL8 Status Variables: Internal Temporary Tables and Files
数字滤波器设计——Matlab
爬取IP
[C language] random number generation and `include < time. H > 'learning
Two methods to judge the size end
Kubeedge releases white paper on cloud native edge computing threat model and security protection technology
基于C语言的信息管理系统和小游戏
Labelme(一)