Where do uninitialized Global Variables go after initializing?

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 printf("%x",&glbl); 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前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准