标签:
从最近的作用域开始寻找,直到找到变量
#include <stdio.h> int main(int argc, const char * argv[]) { int a = 100; { int a = 200; printf("a = %d\n", a); } printf("a = %d\n", a); return 0; }
1 #include <stdio.h> 2 3 int main(int argc, const char * argv[]) { 4 int a = 100; 5 int b = 200; 6 7 printf("The address of a is %d\n", &a); 8 printf("The address of b is %d\n", &b); 9 10 return 0; 11 }
标签:
原文地址:http://www.cnblogs.com/wvqusrtg/p/4500648.html