In C an extern variable gets the initial value of "zero". however after reading about this particular class category.It says that declearing variable as an extern, means the value only passed the "decleration stage".How come a variable can get an initial value without procceding to the initialization stage and allocating a memory for the particular variable? Please consider the following code:
extern int var;
int main(void)
{
var = 10;
return 0;
}
I understand why a problemetic sitution arises: we tried to initialize a value to a variable which is not allocated in the memory(the variable doesn't really exist). My point is: why it's memory doesn't exist and followoing "extern's" terminology the variable has an initial value of "zero". In my mind it means that the memory does actually exist if it has an itial value....