You can?t declare a static variable without defining it as well (this is because the storage class modifiers static and extern are mutually exclusive). A static variable can be defined in a header file, but this would cause each source file that included the header file to have its own private copy of the variable, which is probably not what was intended.
Static variables can be declared in a header file. However, their definition should also be provided in the same header file. But , doing this makes the static variable as a private copy of the header file ie it cannot be used elsewhere. In normal cases, this is not intended from a header file. It is generally a ad idea to use a static variable in a header file.
Static (becoming global in header files) variables can be defined in .h file. However you should make sure that the header is accepted only once by including #ifndef and #ifdef. By this the compiler will not raise errors saying redefinition of same variable.