Original Post
Hi, what is the sense of static in C? I don't get it. I've read the MSDN and another C-Book, but my brain won't understand this. the msdn says
Quote:static duration: and what about global vars? they don't have static duration? huh? variable not visible from outside: i can't see anythink from the outside in C without using extern, or am i wrong? So, if anybody could help to disentangle my brain, then please, do it :)
When modifying a variable, the static keyword specifies that the variable has static duration (it is allocated when the program begins and deallocated when the program ends) and initializes it to 0 unless another value is specified. When modifying a variable or function at file scope, the static keyword specifies that the variable or function has internal linkage (its name is not visible from outside the file in which it is declared).