Re: Global Variables : Where are they stored ?
- From: Podi <zeng.ed@xxxxxxxxx>
- Date: Thu, 29 Nov 2007 23:22:30 -0800 (PST)
On Nov 29, 4:13 pm, Keith Thompson <ks...@xxxxxxx> wrote:
I don't suggest that questions about memory segments aren't important,
or that you shouldn't be asking about them in interviews, just that
such questions aren't really about C.
I agree, and thanks for all the corrections on my posts with my
limited knowledge on the C standard.
Since we deal with mostly Windows (desktop + many variants of CE) and
Linux (many variants of desktop + many variants of embedded Linux),
and our code happens to be in C and C++, we are looking for people who
are at least familiar with the concept of memory layout as described
in the following.
http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php
http://blogs.msdn.com/sloh/archive/2005/02/25/380475.aspx
Since we also deal with many compilers, some of which do not comply
with "the standard", we are (at least I am) slacking quite a bit on
the correct definition of C :)
At the end of the day, the answer "implementation-specific" to OP is
wise and correct, but it will unlikely satisfy the interviewer. The
expected answer is to describe the "general" memory layout of a
process, given the simple, yet subtle question asked in C. And never
heard of "stack/heap" is sort of a no-no :)
Cheers!
.
- Follow-Ups:
- Re: Global Variables : Where are they stored ?
- From: Flash Gordon
- Re: Global Variables : Where are they stored ?
- From: Keith Thompson
- Re: Global Variables : Where are they stored ?
- References:
- Global Variables : Where are they stored ?
- From: Kislay
- Re: Global Variables : Where are they stored ?
- From: santosh
- Re: Global Variables : Where are they stored ?
- From: Richard
- Re: Global Variables : Where are they stored ?
- From: Keith Thompson
- Re: Global Variables : Where are they stored ?
- From: Kislay
- Re: Global Variables : Where are they stored ?
- From: Keith Thompson
- Re: Global Variables : Where are they stored ?
- From: Kislay
- Re: Global Variables : Where are they stored ?
- From: Podi
- Re: Global Variables : Where are they stored ?
- From: Flash Gordon
- Re: Global Variables : Where are they stored ?
- From: Podi
- Re: Global Variables : Where are they stored ?
- From: Mark McIntyre
- Re: Global Variables : Where are they stored ?
- From: Flash Gordon
- Re: Global Variables : Where are they stored ?
- From: Podi
- Re: Global Variables : Where are they stored ?
- From: Keith Thompson
- Global Variables : Where are they stored ?
- Prev by Date: LDBL_MAX -1.#QNAN0e+000 with MinGW?
- Next by Date: Re: What is the proper Syntax for this Pointer?
- Previous by thread: Re: Global Variables : Where are they stored ?
- Next by thread: Re: Global Variables : Where are they stored ?
- Index(es):
Relevant Pages
|