While I read the answers Using the 'extern' keyword when defining a variable
One user answered this question.
extern int a;
extern int a = 42;
I expected that both are not definitions, but declarations. I thought both statements say that the variable is defined outside the function, and we must use the extern keyword to use it. Is it a mistake from him or is this really a definition? I know that
extern int a;
extern int a=42 ;
but this statement
extern int a = 42;
Please cleanse me of them.
niko source
share