11-7全局变量作用域测试
#include<stdio.h>
int a,b;
int f1()
{
int a=10;
printf("i am in f1 a=%d b=%d\n",a,b);
}
float c,d;
int f2()
{
float c=100.0;
printf("i am in f2 a=%d c=%f d=%f\n",a,b,c,d);
}
int main()
{
a=1;
b=2;
c=50.0;
d=60.0;
printf("i am in main1 a=%d c=%f d=%f\n",a,b,c,d);
f1();f2();
printf("i am in main2 a=%d c=%f d=%f\n",a,b,c,d);
return 0;
getchar();
}