23.03.2014, 02:08
static has two uses.
If it is used on a global variable, it limits the scope of the variable to the current file.
If used on a local variable, it basically makes the local variable a global variable whose scope is what the scope of the local variable would be (i.e. it retains the value).
If it is used on a global variable, it limits the scope of the variable to the current file.
If used on a local variable, it basically makes the local variable a global variable whose scope is what the scope of the local variable would be (i.e. it retains the value).