In what segment (.BSS, .DATA, other) of an executable file are static variables stored so that they don\'t have name collision? For example:
foo.c:
static variable stored in data segment or code segment as mentioned before.
You can be sure that it will not be allocated on stack or heap.
There is no risk for collision since static
keyword define the scope of the variable to be a file or function, in case of collision there is a compiler/linker to warn you about.
A nice example