Intel Corporation Interview Question

where are global and local variables stored in memory?

Interview Answers

Anonymous

Aug 24, 2009

Initialized, non-const global variables are in the .data segment, Initialized constant global variables are in the .rodata segment, uninitialized global data are in the .bss segment, and local variables are on the stack.

1

Anonymous

Jul 8, 2009

static memory and the stack