P
Ping Cheu
It turn out that in past I completely mix variable storage and linkage
when I saw static and external.
Now that I learned the differences, and here is my three-line report,
extern int gloabl_1; /* external storage, external linkage */
int global_2; /* static storage, external linkage */
static int global_3; /* static storage, static linkage */
Also, the static declaration causes the functions values to be retained
whether the function is in execution or not.
Please let me know if I'm wrong again.
Now my question will be: if I make executable from 2 *.c modules. In both
files I have an int global (static storage, external linkage): is there
be only one variable and where it stored?
Thankyou
Ping
when I saw static and external.
Now that I learned the differences, and here is my three-line report,
extern int gloabl_1; /* external storage, external linkage */
int global_2; /* static storage, external linkage */
static int global_3; /* static storage, static linkage */
Also, the static declaration causes the functions values to be retained
whether the function is in execution or not.
Please let me know if I'm wrong again.
Now my question will be: if I make executable from 2 *.c modules. In both
files I have an int global (static storage, external linkage): is there
be only one variable and where it stored?
Thankyou
Ping