Thread: Where are the different types of variables of a program stored in memory?

  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    2

    Where are the different types of variables of a program stored in memory?

    Where are the different types of variables of a program stored in memory?

  2. #2
    FOX
    Join Date
    May 2005
    Posts
    188
    Global initialized variables - Data segment
    Global uninitialized variables - BSS segment
    Local initialized variables - Stack
    Local uninitialized variables - Stack?

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    What are the different types of homework questions (I've seen two so far).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    C/C++Newbie Antigloss's Avatar
    Join Date
    May 2005
    Posts
    216
    What dose this BSS stands for ?

    Dynamically allocate variables - heap?

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. memory not released after running program
    By lehe in forum Linux Programming
    Replies: 21
    Last Post: 01-01-2011, 03:32 AM
  2. Creating local variables in a program?
    By fl0at in forum C Programming
    Replies: 5
    Last Post: 01-04-2008, 07:34 PM
  3. Locating A Segmentation Fault
    By Stack Overflow in forum C Programming
    Replies: 12
    Last Post: 12-14-2004, 01:33 PM
  4. operator overloading and dynamic memory program
    By jlmac2001 in forum C++ Programming
    Replies: 3
    Last Post: 04-06-2003, 11:51 PM
  5. Im so lost at . .
    By hermit in forum C Programming
    Replies: 18
    Last Post: 05-15-2002, 01:26 AM