[Gllug] data segment vs stack

J F jnns at linuxmail.org
Tue Feb 14 13:01:08 UTC 2006


> Message: 1
> Date: Tue, 14 Feb 2006 11:10:58 +0 00
> From: "t.clarke" <tim at seacon.co.uk>
> Subject: [Gllug] data segment vs stack
> To: gllug at gllug.org.uk
> Message-ID: <tim-060214.11105882.20567 at seacon.co.uk>
> 
> Apologies if this question seems silly,  but I am just curious as to whether
> the variables declared in the 'main()' function of a C program are created
> in the program's stack (in the same manner as variables declared in any
> 'subsidiary' functions), or in the data segment  (which is where I assume
> 'global' variables are created?)
> 
> Can anyone enlighten me or point to a web resource that explains ?

I'm new to C programming and I don't fully understand what the data segment or the stack are but I hope this helps:
http://gd.tuwien.ac.at/languages/c/programming-bbrown/c_046.htm

-- 
_______________________________________________
Check out the latest SMS services @ http://www.linuxmail.org
This allows you to send and receive SMS through your mailbox.

Powered by Outblaze
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list