I am reading this code from here(in Chinese). There is one piece of code about testing global variable in C. The variable a has been defined in the file t
b has the same address because the linker decided to resolve the conflict for you.
sizeof shows different values because sizeof is evaluated at compile time. At this stage, the compiler only knows about one b (the one defined in the current file).