Static variable with the same name in different file [duplicate]
问题 This question already has answers here : How are static variables with the same name in different functions identified by the System? (3 answers) Closed 6 years ago . I have tried running and compiling the code where I have defined the static variables with the same name in two different source files. The code was compiled successfully and running. Now my question is that both the static variables reside in the . data/BSS section in the memory. As per my understanding two different memory