Is there any difference between a variable declared as static outside any function between C and C++. I read that static means file scope and the varia
There are two concepts here "static linkage (or scope)" and static allocation".
Outside a function the keyword refers to linkage, inside it refers to allocation. All variables outside a function have static allocation implicitly. An unfortunate design perhaps, but there it is.