Global too goes to stack,the data stack.Static variables also go to the
stack.That's how they retain their values during function calls.

On Sun, Jul 17, 2011 at 3:02 PM, Ankur Khurana <[email protected]>wrote:

> more generally what is the memory structure of local , global and runtime
> allocated variable . I guess , runtime allocation is done from memory heap ,
> local goes in to a stack . What about global ?
>
>
> On Sun, Jul 17, 2011 at 2:57 PM, Ankur Khurana 
> <[email protected]>wrote:
>
>> Can we do this ?
>>
>> int i=12;
>> free(&i);
>>
>>
>>
>>
>>
>>
>> Regards,
>> Ankur Khurana
>> Computer Science , 4th year
>> Netaji Subhas Institute Of Technology
>> Delhi.
>>
>>
>
>
> --
> Ankur Khurana
> Computer Science , 4th year
> Netaji Subhas Institute Of Technology
> Delhi.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Saurabh Singh
B.Tech (Computer Science)
MNNIT ALLAHABAD

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to