给定以下C语言代码:
static int x = 0;
int what_is_this(void) {
static int y = 5;
x = x + y;
y = y + 1;
return y;
}
int main(void) {
int v = what_is_this();
printf("%d\n", v);
return v;
}
关于链接器,what_is_this
是否是全局符号?
x
是局部符号吗?
v
没有被注册为符号吗?
v
没有被注册为符号,因为链接器从未看到局部变量声明。这是正确的吗? - WJL