Hi,
How can we declare a static variable or function declared in one
source file, which is to be used in other source file?
If you want to easily share it with other translation units, define it
without the static keyword.
Whether that answers your question depends on what you mean by static,
since the keyword has several different meanings in C. All objects
defined at file scope have static storage duration. Adding the static
keyword only changes their linkage from external to internal.
If you mean objects defined at file scope with the static keyword, or
functions defined with the static keyword, the only way to access or
call them from other translation units is via a pointer initialized in
or provided by the translation unit that contains the definition.