際際滷
Submit Search
C language lect_22_advanced
Download as PPTX, PDF
0 likes
68 views
Roman Brovko
Follow
C language
Read less
Read more
1 of 22
Download now
Download to read offline
More Related Content
C language lect_22_advanced
1.
C Language C Language Advanced Lection
22
2.
弌仂亟亠亢舒仆亳亠 弍仍舒亳 于亳亟亳仄仂亳
仗亠亠仄亠仆仆 仍舒 仗舒仄亳 仗亠亠仄亠仆仆 auto register extern static 仂亟亳亳从舒仂 static 亟仍 仆从亳亳 仍ム亠于仂亠 仍仂于仂 volatile 23.05.2019 0:36 Advanced 2
3.
弍仍舒亳 于亳亟亳仄仂亳 仗亠亠仄亠仆仆 #include
<stdio.h> unsigned int myGlobalVariable; int main() { unsigned int myLocalVariable_lv0; { unsigned int myLocalVariable_lv1; { unsigned int myLocalVariable_lv2; } } return 0; } 3
4.
亳仄亠 #1 4
5.
亳仄亠 #1 5
6.
仍舒 仗舒仄亳 仗亠亠仄亠仆仆 仍舒
仗舒仄亳 仂仗亠亟亠仍磳: 仂弍仍舒 亟亠亶于亳 仗亠亠仄亠仆仆仂亶; 于亠仄 亢亳亰仆亳 仗亠亠仄亠仆仆仂亶 6
7.
仍舒 仗舒仄亳 auto auto
- 仗亠亳亳从舒仂 舒于仂仄舒亳亠从仂亞仂 从仍舒舒 仗舒仄亳 从舒亰于舒亠 仆舒 仂, 仂 仂弍亠从 舒仗仂仍舒亞舒亠 于 仍仂从舒仍仆仂亶 (亳仍亳 舒于仂仄舒亳亠从亳 舒仗亠亟亠仍磳仄仂亶) 仗舒仄亳. 7
8.
亳仄亠 #2 8
9.
仍舒 仗舒仄亳 register register
- 仗亠亳亳从舒仂 舒于仂仄舒亳亠从仂亞仂 从仍舒舒 仗舒仄亳. 亳仄亠仆磳 从 仂弍亠从舒仄, 仗仂 仄仂仍舒仆亳 舒仗仂仍舒亞舒亠仄仄 于 仍仂从舒仍仆仂亶 仗舒仄亳. 亠亟舒于仍磳 亳亰 亠弍 "仆亠仆舒于磶亳于 仗仂弍" 从 舒仆仍仂 (亠仍亳 仂 于仂亰仄仂亢仆仂) 仂 舒亰仄亠亠仆亳亳 亰仆舒亠仆亳亶 仂弍亠从仂于, 仂弍磦仍亠仆仆 仂 仗亠亳亳从舒仂仂仄 register 于 仂亟仆仂仄 亳亰 亟仂仗仆 亠亞亳仂于, 舒 仆亠 于 仍仂从舒仍仆仂亶 仗舒仄亳. 9
10.
亳仄亠 #3 10
11.
仍舒 仗舒仄亳 extern extern
- c仗亠亳亳从舒仂 于仆亠仆亠亞仂 舒亳亠从仂亞仂 从仍舒舒 仗舒仄亳. 弍亠仗亠亳于舒亠 亠于仂于舒仆亳亠 仂弍亠从舒 仄仂仄亠仆舒 亠亞仂 仂仗亠亟亠仍亠仆亳 亟仂 从仂仆舒 于仗仂仍仆亠仆亳 仗仂亞舒仄仄. 弍亠从, 仂弍磦仍亠仆仆亶 仂 仗亠亳亳从舒仂仂仄 extern 亟仂仗亠仆 于仂 于亠 仄仂亟仍 仗仂亞舒仄仄, 仂 亠 亞仍仂弍舒仍亠仆 11
12.
仍舒 仗舒仄亳 extern 12
13.
仍舒 仗舒仄亳 static static
仗亠亳亳从舒仂 于仆亠仆仆亠亞仂 舒亳亠从仂亞仂 从仍舒舒 仗舒仄亳. 亳仄亠仆磳 仂仍从仂(!) 从 亳仄亠仆舒仄 仂弍亠从仂于 亳 仆从亳亶. C 仂 仗亠亳亳从舒仂 亳仄亠亠 亟于舒 亰仆舒亠仆亳. 亠于仂亠 仂亰仆舒舒亠, 仂 仂仗亠亟亠仍磳仄亶 仂弍亠从 舒仗仂仍舒亞舒亠 仗仂 亳从亳仂于舒仆仆仂仄 舒亟亠. 丐亠仄 舒仄仄 仂弍亠仗亠亳于舒亠 亠于仂于舒仆亳亠 仂弍亠从舒 仄仂仄亠仆舒 亠亞仂 仂仗亠亟亠仍亠仆亳 亟仂 从仂仆舒 于仗仂仍仆亠仆亳 仗仂亞舒仄仄. 仂仂亠 亰仆舒亠仆亳亠 仂亰仆舒舒亠 仍仂从舒仍仆仂. 弍磦仍亠仆仆亶 仂 仗亠亳亳从舒仂仂仄 static 仍仂从舒仍亠仆 于 仂亟仆仂仄 仗仂亞舒仄仄仆仂仄 仄仂亟仍亠 (仂 亠, 仆亠亟仂仗亠仆 亳亰 亟亞亳 仄仂亟仍亠亶 仄仆仂亞仂仄仂亟仍仆仂亶 仗仂亞舒仄仄). 13
14.
亳仄亠 #4 14
15.
亳仄亠 #4 15
16.
亳仄亠 #5 16
17.
仂亟亳亳从舒仂 static 亟仍
仆从亳亳 17
18.
亳仄亠 #6 18
19.
仍舒 仗舒仄亳 仗亠亠仄亠仆仆 (舒于仆亳亠仍仆舒
舒弍仍亳舒) 19
20.
仍ム亠于仂亠 仍仂于仂 volatile 仍ム亠于仂亠
仍仂于仂 volatile 亳仆仂仄亳亠 从仂仄仗亳仍仂, 仂 亰仆舒亠仆亳亠 仗亠亠仄亠仆仆仂亶 仄仂亢亠 仄亠仆 亳亰于仆亠. 亅仂 仄仂亢亠 仗仂亳亰仂亶亳 仗仂亟 仗舒于仍亠仆亳亠仄 仂仗亠舒亳仂仆仆仂亶 亳亠仄, 舒仗仗舒舒仆 亠亟于 亳仍亳 亟亞仂亞仂 仗仂仂从舒. 仂从仂仍从 亰仆舒亠仆亳亠 仄仂亢亠 亳亰仄亠仆亳, 从仂仄仗亳仍仂 从舒亢亟亶 舒亰 亰舒亞亢舒亠 亠亞仂 亳亰 仗舒仄亳. 20
21.
亳仄亠 #7 21
22.
亳仄亠 #7 22
Download