fix: 考察static,适当修正
This commit is contained in:
parent
6f1bdc9826
commit
5560f24b57
|
|
@ -23,18 +23,18 @@ title: 2025-2026学年春季期期中(张泉)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
2. a=\_\_\_\_
|
2. a=\_\_\_\_<br></br>a=\_\_\_\_
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#include<stdio.h>
|
#include<stdio.h>
|
||||||
void Anaesthesia(int b) {
|
void Anaesthesia(int b) {
|
||||||
static int a = 0;
|
static int a = 0;
|
||||||
a += b;
|
a += b;
|
||||||
|
printf("a=%d\n", a);
|
||||||
}
|
}
|
||||||
int main() {
|
int main() {
|
||||||
Anaesthesia(5);
|
Anaesthesia(5);
|
||||||
Anaesthesia(5);
|
Anaesthesia(5);
|
||||||
printf("a=%d", a);
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue