正如我们所知,变量的外部声明可以被初始化。
#include<stdio.h>
extern int a=5; //will work as both definition and declaration.
int main()
{
}
为什么这个程序编译和运行没有错误。
extern int a=5; //will work as both definition and declaration.
int main()
{
}
int a; // isn't it second definition??