Extern variables question

Charles Hannum CMH117 at PSUVM.BITNET
Thu Nov 16 17:29:57 AEST 1989


You should define a global variable in *exactly one* module, no more, no less.
All other modules should refer to it as an extern.  Most linkers will generate
an error if a global variable by the same name is defined in more than one
module.

As for initializing it, that depends ...  Your answer could be either B or C.



More information about the Comp.lang.c mailing list