943,929 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 1624
  • C RSS
Apr 5th, 2007
0

how the memory is allocated?

Expand Post »
Memory allocation of variables declared in a program is ------
a) Allocated in RAM
b) Allocated in ROM
c) Allocated in stack
d) Assigned in registers.
which one is correct please tell me the answer in 24 hrs...
Similar Threads
Reputation Points: 9
Solved Threads: 1
Light Poster
satish.paluvai is offline Offline
45 posts
since Mar 2007
Apr 5th, 2007
0

Re: how the memory is allocated?

In RAM .... Is this a homewrk?
Reputation Points: 27
Solved Threads: 2
Posting Whiz in Training
jan1024188 is offline Offline
254 posts
since Aug 2006
Apr 5th, 2007
0

Re: how the memory is allocated?

Memory allocation of variables declared in a program is ------
a) Allocated in RAM
b) Allocated in ROM
c) Allocated in stack
d) Assigned in registers.
which one is correct please tell me the answer in 24 hrs...
both a and c are correct in a way. Memory allocation of variables is logically stored on the stack which in turn is physically stored on RAM although there is no stack structure whilst stored in RAM. Sometimes d is also right.

If optimization needs to be performed then the same variable might get a place in the register.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
desijays is offline Offline
21 posts
since Mar 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC