why is the storage class of global variables in C implicitly defined as "extern"? : when we declare any global variable , for instance 

    int x ; 
it is equivalent to 

    extern int x; 

Now by default global variables are intialized to 0 by the compiler ,which means they are allocated memory .But if I simply write 

    extern int x ;
 Then this will only declare the variable , while no memory would be allocated o it , so my query is that if I write **extern** before int x or I do not write it , **in case of global variables** , how is the compiler treating them differently since in case where I simply write `int x` , it allocates memory and simultaneously it puts **extern** before int x , while in case where I write `extern int x` , It only declares the variable while no memory is allocated to it , please clarify how the compiler is behaving in both ways .
     

