Output will be :
66
warning: ‘a’ initialized and declared ‘extern’
extern int a = 6;
Extern keyword is the way we can declare a variable without actually defining it. But here we are declaring the variable and initializing at the same time which means that the memory is being allocated, which again means that the definition of the variable is given.
Hence, the compiler will show the warning message though it will compile successfully.
Declaration: Memory is not allocated only the prototype is given, that is the type of the arguments, return type etc.
Definition: Memory is allocated.