Hi,
What is default storage class of a global variable?
While searching on web I found, some sites say it is static
. But, static means internal linkage and the variable can not be available outside the file scope i.e it should not be available to other object files. But, they still can be accessed to other files using declarations like extern int i
.
And, if I explicitly mention static
to global variable then it is not available outside the file scope.
Then, what is correct default storage class for the global variables?