I struck a little problem when learning. I know that uninitialized global variables in C are assigned to the .bss section in the executable ELF file. But what happens to them when I start to use them?
I.e. do they get a place on the heap or somewhere else?
I tried to find out by printing the address of the (still uninitialized) global variable with
which always return the same value 0x80495bc... Why? I've noticed that you accepted an answer 5 minutes after asking the question. You'll get more answers if you leave it open for some time as people will be more motivated to improve on the answers.
以上就是Where do uninitialized Global Variables go after initializing?的详细内容，更多请关注web前端其它相关文章！