当前位置:网站首页>[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 .
边栏推荐
猜你喜欢

15 -- k points closest to the origin

ffmpeg protocol concat 进行ts流合并视频的时间戳计算及其音画同步方式一点浅析

Use Matplotlib to draw a line chart

Sequential programming 1

如何裁剪动图大小?试试这个在线照片裁剪工具

弹性布局(display:flex;)属性详解

【中國海洋大學】考研初試複試資料分享

SPARQL learning notes of query, an rrdf query language

关于win10 版本kicad 卡死的问题, 版本6.x

Jaspersoft studio adding MySQL database configuration
随机推荐
Qmake uses toplevel or topbuilddir
如何裁剪动图大小?试试这个在线照片裁剪工具
Automatic correlation between QT signal and slot
90 后眼中的理想 L9:最简单的产品哲学,造最猛的爆款 | 指南斟
NBD Network Block Device
Design and implementation of thread pool
Gif动图如何裁剪?收下这个图片在线裁剪工具
dev/mapper的解释
C language LNK2019 unresolved external symbols_ Main error
QT file reading -qfile
Stack and queue
Is it safe to open an online stock account? Who knows
Breakpad usage and DMP analysis
Character encoding minutes
[Ocean University of China] information sharing for the first and second examinations of postgraduate entrance examination
System Verilog - function and task
JS select all exercise
Explanation of dev/mapper
QT database connection deletion
The best time to buy and sell stocks