TA的每日心情 | 汗 2024-10-15 10:05 |
---|
签到天数: 372 天 [LV.9]以坛为家II
|
本帖最后由 Sian 于 2014-2-20 21:02 编辑
请推断出以下代码的输出:
- #include <stdio.h>
- int main() {
-
- int score = 100;
-
- {
- int score = 200;
-
- {
- score = 300;
-
- printf("score = %d\n",score);
- }
-
- printf("score = %d\n", score);
- }
-
- printf("score = %d\n", score);
-
- }
复制代码 理解C语言变量的作用域
|
|