全局声明的变量被称为具有程序范围
使用静态关键字全局声明的变量被称为具有文件范围。
例如:
int x = 0; // **program scope**
static int y = 0; // **file scope**
static float z = 0.0; // **file scope**
int main()
{
int i; /* block scope */
/* .
.
.
*/
return 0;
}
这两者有什么区别?