当前位置:网站首页>In depth analysis of C language - variable error prone knowledge points # dry goods inventory #
In depth analysis of C language - variable error prone knowledge points # dry goods inventory #
2022-07-02 03:22:00 【Konjak_ Konnyaku】
Variables are very basic content , But be sure to master !
3.1. What is a variable
3.2. How to define variables - How to use it?
3.3 Why define variables
Computers are born to solve the problem of people's lack of computing power . namely , Computers are for calculation .
And calculation , You need data .
And to calculate , Any moment , Not all data should be calculated immediately .Why variables are needed ? Because there is data that needs to be saved temporarily , Waiting for further processing
3.4 The essence of variable definition
- The program runs , It needs to be loaded into memory
- Program calculation , You need to use variables
The essence of variable definition : Open up a space in memory , To hold data ( Why must it be memory : Because defining variables , It's also part of program logic , The program has been loaded into memory )
3.5 The nature of variable declarations
Declared variables are usually added extern keyword :
Be careful : Cannot initialize when declaring
The declaration even tells the compiler , This variable is defined elsewhere , Declarations do not allocate memory space to variables !!
3.6 About the difference between declaration and definition
difference : The definition has memory allocation , Declaration has no memory allocation
Be careful : Cannot initialize when declaring
Statement
The declaration just tells the compiler that there is such a variable or function , This function or variable is defined in other places , So in this process, no memory is allocated again , Therefore, a declaration can be declared more than once ;
Definition
A program opens up memory space for its variables or functions at run time , Definition can only be defined once .
As for initialization , Is to complete the development of memory space , Fill in the specified value for the memory opened up .
边栏推荐
- GSE104154_ scRNA-seq_ fibrotic MC_ bleomycin/normalized AM3
- Pointer array & array pointer
- Verilog 状态机
- [数据库]JDBC
- Redis set command line operation (intersection, union and difference, random reading, etc.)
- Qualcomm platform WiFi -- P2P issue (2)
- Global and Chinese markets for infant care equipment, 2022-2028: Research Report on technology, participants, trends, market size and share
- This article describes the step-by-step process of starting the NFT platform project
- Large screen visualization from bronze to the advanced king, you only need a "component reuse"!
- 浅谈线程池相关配置
猜你喜欢

Golang configure export goprivate to pull private library code
![Find duplicates [Abstract binary / fast and slow pointer / binary enumeration]](/img/9b/3c001c3b86ca3f8622daa7f7687cdb.png)
Find duplicates [Abstract binary / fast and slow pointer / binary enumeration]

Discrimination between sap Hana, s/4hana and SAP BTP

跟着CTF-wiki学pwn——ret2shellcode

PY3, PIP appears when installing the library, warning: ignoring invalid distribution -ip

Verilog state machine

Delphi xe10.4 installing alphacontrols15.12

halcon图像矫正

ZABBIX API creates hosts in batches according to the host information in Excel files

Named block Verilog
随机推荐
Mmsegmentation series training and reasoning their own data set (3)
浅谈线程池相关配置
Form custom verification rules
32, 64, 128 bit system
Global and Chinese market of handheld ultrasonic scanners 2022-2028: Research Report on technology, participants, trends, market size and share
SAML2.0 笔记(一)
How to establish its own NFT market platform in 2022
Work hard all day long and be alert at sunset
Verilog reg register, vector, integer, real, time register
Delphi xe10.4 installing alphacontrols15.12
Kotlin基础学习 14
Competition and adventure burr
[数据库]JDBC
West digital decided to raise the price of flash memory products immediately after the factory was polluted by materials
【JVM】创建对象的流程详解
Qualcomm platform wifi-- WPA_ supplicant issue
Verilog 状态机
A list of job levels and salaries in common Internet companies. Those who have conditions must enter big factories. The salary is really high
tarjan2
[golang] leetcode intermediate bracket generation & Full Permutation