Output
linker error (undefined symbol x)
Explanation
extern keyword tells the compiler that the value of the variable x is not in this scope so the compiler does not know variable x memory location so he will not assign x memory location , otherwise during linking time if x is defined in another scope or file , its value will be printed
No comments:
Post a Comment