当前位置:网站首页>[C language] 32 keyword memory skills
[C language] 32 keyword memory skills
2022-06-25 15:02:00 【52Hertz. six hundred and fifty】
The first category : Data type key
A Basic data type (5 individual )
- void: Declare that the function has no return value or parameter , Declare no type pointer , Explicitly discard the result of the operation .
- char: Character data type
- int: Integer data type
- float: Single precision floating point data ( A type of floating-point data , After the decimal point 6 position )
- double: Double precision floating point data ( A type of floating-point data , Than float High precision of type , After the decimal point 15/16 position )
B Type modifier keyword (4 individual )
- short: modification int, Short integer data , Modified can be omitted int.
- long: modification int, Long data , Modified can be omitted int.
- signed: Modifying integer data , Signed data types .
- unsigned: Modifying integer data , The unsigned data type .
C Complex type keywords (5 individual )
- struct: Structure declaration
- union: Community statement
- enum: Enum Declarations
- typedef: Declare type aliases
- sizeof: Get the size of bytes occupied by a specific type or a specific type variable
D Storage level keywords (6 individual )
- auto: Specified as an automatic variable , Automatically allocated and released by the compiler ( Usually allocated on the stack ).
- static: Specified as a static variable , Assigned in the static variable area . When modifying a function , Specifies that the function scope is inside the file .
- register: Specified as a register variable , It is recommended that the compiler store variables in registers ; You can also modify function parameters , It is recommended that the compiler pass parameters through registers rather than stacks .
- extern: Specifies that the corresponding variable is an external variable , That is, the definition in another object file , It can be said that the agreement is declared by another document .
- const: And volatile combined term “ cv characteristic ” , The specified variable cannot be used by the current thread / The process changes ( But it could be by the system or other threads / The process changes ).
- volatile: And const combined term “ cv characteristic ” , The value of the specified variable may be changed by the system or other threads / The process changes , Force the compiler to get the value of the variable from memory at a time .
The second type of process control keywords
A Jump structure (4 individual )
- return: In the body of a function , Returns a specific value ( or void value , That is, no value is returned ).
- continue: End the current cycle , Start next cycle .
- break: Jump out of the current loop or Switch structure
- goto: Jump statements without conditions
B Branching structure (5 individual )
- if: Conditional statements
- else: Conditional statement negates Branch ( And if Continuous use )
- switch: Switch statement ( Multiple branch statements )
- case: Branch markers in switch statements
- default: In the switch statement “ other ” Branch ( Optional )
C Loop structure (3 individual )
- for:for Loop structure
for(①;②;③) ④ ;
The execution order of is ①→②→④→③→②→④… loop , among ② Is the cyclic condition . - do:do Loop structure
do ① while(②) ;
The execution order of is ①→②→①→②→①… loop , among ② Is the cyclic condition . - while:while Loop structure
while(①) ② ;
The execution order of is ①→②→①→②→①… loop , among ① Is the cyclic condition .
Thought I did a good job of cleaning up , Please move your precious finger and give me a compliment .
边栏推荐
- [deep learning] multi label learning
- 3. Sequential structure multiple choice questions
- Design and implementation of thread pool
- 网上股票开户安不安全?有谁知道呢
- [try to hack] vulhub shooting range construction
- Biscuit distribution
- Gif动画怎么在线制作?快试试这款gif在线制作工具
- HMS core machine learning service realizes simultaneous interpretation, supports Chinese-English translation and multiple voice broadcast
- Ideal L9 in the eyes of the post-90s: the simplest product philosophy, creating the most popular products
- Explanation of dev/mapper
猜你喜欢
Gif动画怎么在线制作?快试试这款gif在线制作工具
Thymeleaf Usage Summary
2022年广东高考分数线出炉,一个几家欢喜几家愁
多张动图怎样合成一张gif?仅需三步快速生成gif动画图片
Kubernetes understands kubectl/ debugging
C language escape character and its meaning
Js- get the mouse coordinates and follow them
JGG | overview of duhuilong group of Hebei University Research on plant pan genomics
Use Matplotlib to draw a line chart
Judging the number of leap years from 1 to N years
随机推荐
买卖股票的最佳时机
basic_ String mind map
Heavyweight! The domestic IDE is released and developed by Alibaba. It is completely open source! (high performance + high customization)
p1408
One question per day, a classic simulation question
JS to add elements to the header, or tail of an array
定位position(5种方式)
开餐馆
dmsetup命令
Single user mode
Js- get the mouse coordinates and follow them
Customization and encapsulation of go language zap library logger
[Ocean University of China] information sharing for the first and second examinations of postgraduate entrance examination
Time stamp calculation and audio-visual synchronization of TS stream combined video by ffmpeg protocol concat
Ideal L9 in the eyes of the post-90s: the simplest product philosophy, creating the most popular products
Custom structure type
Study notes of cmake
HMS Core机器学习服务实现同声传译,支持中英文互译和多种音色语音播报
NBD Network Block Device
‘make_ unique’ is not a member of ‘std’