Where are global variables located in the activation record for C?
问题 In C, each function has an activation record which is allocated on a stack frame. Local variables are allocated in their own function's activation record. So, what is the case with global variables? Where are they allocated? For example #include <stdio.h> int a; void v() {a= 2; int b; b++; } main() { int f; printf("\n%d",a); v(); } -----Activation record---- ------------------- ------------------- activation record for main ------------------- int f ------------------- -------------------